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

Handle both mouse wheel and trackpad #1972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TedDriggs
Copy link

The current code ignores magnitude differences in deltaY, resulting in an experience that is either too fast on trackpad or too slow with a mousewheel.

This change allows those to differ within a clamped range, so that one zoomSpeed value works well for both input devices.

Fixes #1882

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

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

LGTM

@mojoaxel mojoaxel requested a review from Thomaash July 20, 2023 07:37
@jeffrey-e
Copy link

Looking forward to this improvement!

The current code ignores magnitude differences in deltaY, resulting in an experience that is either too fast on trackpad or too slow with a mousewheel.

This change allows those to differ within a clamped range, so that one zoomSpeed value works well for both input devices.

Fixes visjs#1882
@TedDriggs
Copy link
Author

@Thomaash could you take a look at this PR? Having a fix for this would let us remove a very clunky workaround in our app where we have to give the user a setting to tell us which input device they're using.

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.

Allow separate zoom speeds for wheel and trackpad
3 participants