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

Zooming with a Magic Mouse or trackpad is too fast #15423

Open
ath0mas opened this issue Dec 12, 2023 · 2 comments · May be fixed by #15425
Open

Zooming with a Magic Mouse or trackpad is too fast #15423

ath0mas opened this issue Dec 12, 2023 · 2 comments · May be fixed by #15425
Labels

Comments

@ath0mas
Copy link
Contributor

ath0mas commented Dec 12, 2023

Describe the bug
Users and I are experiencing super fast zooming on our private maps when using a Magic Mouse or a trackpad.
It is quite unusable since in like 2, maximum 3, standard "wheel" moves the map jumps from street level to world view.
The zoom seems really too sensitive, while on other mainstream maps websites it's not the case.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://openlayers.org/en/latest/examples/pinch-zoom.html
  2. Use a Magic Mouse or trackpad to zoom
  3. In 2 or 3 moves the map jumps from street to world view

We are using OpenLayers v6, but as described, we have the same behavior with current examples from main branch.
It seems that before our upgrade to v6, such behavior did not exist.
Our maps always has constrainResolution: true.

Expected behavior
Zooming with a trackpad should be less sensitive.

WIP: I'll prepare a PR soon, as I analyzed and possibly found a condition that should be inverted to be more logical to me.
(related to #10672 changes)

@ath0mas ath0mas added the bug label Dec 12, 2023
ltshb added a commit to geoadmin/web-mapviewer that referenced this issue Feb 27, 2024
devices/os

On some device and os the mouse zoom wheel was unusable (one scroll step
would result to full zoom in or out). A user reported this per email and
I had the issue on my private windows machine with its touchpad and with
2 different mouses. Strangely the same mouse were working fine with
my HP Zbook on linux.

See also openlayer issue openlayers/openlayers#15423
@ltshb
Copy link
Contributor

ltshb commented Feb 27, 2024

I had the similar issue using the constrainResolution: true, see geoadmin/web-mapviewer#665. I solved the issue by removing this flag.
The issue was strange the zoom in/out was with one small scroll almost a full zoom in or out. What was strange also is that it was mouse device and os dependent. On Windows 11 I had the issue with 2 different mouse, but using the same mouse on another laptop using linux, the srcoll was working fine.

@ahocevar
Copy link
Member

Just one note from a user's perspective: I find OpenLayers apps with constrainResolution: true quite annoying. I want to be in control of the viewport I see. A constrained resolution always zooms me to a viewport I do not want. I'm wondering why many application developers use this setting.

ltshb added a commit to geoadmin/web-mapviewer that referenced this issue Feb 28, 2024
devices/os

On some device and os the mouse zoom wheel was unusable (one scroll step
would result to full zoom in or out). A user reported this per email and
I had the issue on my private windows machine with its touchpad and with
2 different mouses. Strangely the same mouse were working fine with
my HP Zbook on linux.

See also openlayer issue openlayers/openlayers#15423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants