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

refactor(behavior): optimize zoom canvas experience #5584

Merged
merged 1 commit into from Mar 22, 2024
Merged

Conversation

Aarebecca
Copy link
Contributor

  • 优化 ZoomCanvas 交互

  • Optimize ZoomCanvas Experience

@@ -116,9 +121,9 @@ export class ZoomCanvas extends BaseBehavior<ZoomCanvasOptions> {
}

const { sensitivity, onfinish } = this.options;
const diff = (value * sensitivity) / 10;
const ratio = 1 + (clamp(value, -50, 50) * sensitivity) / 100;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

限制单次滚动值的范围,避免 zoom 突变

@hustcc hustcc merged commit 7024c5e into v5 Mar 22, 2024
5 checks passed
@hustcc hustcc deleted the refactor/zoom-canvas branch March 22, 2024 09:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants