-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Shift+Zoom only zoom 1 level by 1 level under Windows #3334
Comments
I can't reproduce — shift-zoom works as expected the first time and all subsequent ones. Can you reproduce consistently? What browser/OS are you using? |
Well I can't reproduce it either... I close the issue & re-open if it happens again |
I can reproduce this in 0.27.0 - in the examples page. In my own test with a fullscreen div it works. |
I am unable to reproduce this on my machine (OSX + Chrome 54) |
I think I got it now! |
I don't see any difference between keeping shift pressed or not. Both behave as expected. |
I can confirm though. Without releasing shift, I've got the bug. Sometimes nothing happens, sometimes it zooms for one level. |
Got another report of this in #3961. The common theme among all reported instances here seems to be Windows, although I'm quite puzzled why this can happen. Anyone with a Windows machine that can debug this further? |
The problem is that, when the shift key is down, the KeyboardHandler._onKeyDown() method is being called repeatedly which calls the easeTo() method each time. This interferes with the call to easeTo() by the BoxZoomHandler. To fix this all you need to do is put a return statement in the default case in the KeyboardHandler._onKeyDown() switch statement, so that it doesn't call easeTo() unless one of the zoom/pan keys is pressed. |
Thanks for the diagnosis Jason! Would you mind putting together a PR? I can make the change you describe but would be unable to verify that it fixes the problem. |
Sure, but I'm not sure how to create a PR. |
I made the code change and am ready to push my branch, but I don't seem to have access rights. |
@x9xjdzz9 I think you'll need to make a personal fork and then use that to make your PR. thanks for working on this! |
This was fixed by #4533 |
Steps to Trigger Behavior
Expected Behavior
Should high zoom to the selected area
Actual Behavior
Zoom 1 level by 1 level
EDIT : Actually the shift-zoom works the 2nd time you shift-zoom
The text was updated successfully, but these errors were encountered: