Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

预览的是图片尺寸很大的图,但是scale设置了最大为6,导致放大到最大都达不到图片本身的尺寸 #159

Open
erinlee1 opened this issue Sep 7, 2023 · 2 comments

Comments

@erinlee1
Copy link

erinlee1 commented Sep 7, 2023

No description provided.

@erinlee1
Copy link
Author

erinlee1 commented Sep 7, 2023

能否设置prop,自定义maxScale

@MinJieLiu
Copy link
Owner

export const limitScale = (scale: number, max: number = 0, buffer: number = 0) => {
  return limitNumber(scale, minScale * (1 - buffer), Math.max(maxScale, max) * (1 + buffer));
};

图片实际很大的话会突破限制的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants