-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Allow pinch trackpad gesture while cooperative gestures is enabled #4465
Allow pinch trackpad gesture while cooperative gestures is enabled #4465
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4465 +/- ##
=======================================
Coverage 87.74% 87.74%
=======================================
Files 246 246
Lines 33412 33421 +9
Branches 2209 2196 -13
=======================================
+ Hits 29316 29326 +10
- Misses 3081 3082 +1
+ Partials 1015 1013 -2 ☔ View full report in Codecov by Sentry. |
There's a bug with latest node regarding code coverage unfortunately... |
Did you check the pinch on a mac as well to see that it behaves the same? |
I have relied on the tests for this PR. Is there a way to easily test an embed or something while developing? Or do I need to make another codebase to test this one using npm link or something? |
|
@HarelM I've tested this on Chrome and Firefox on my MacBook Pro. I can't test Safari because the server started via |
I never tried opening on safari to be honest... |
What this does
Enables pinching on a trackpad to zoom the map while
cooperativeGestures
is enabled.Fixes #4463
Implementation
A pinch on a trackpad is actually a
wheel
event but withctrlKey: true
. This change adds a new method to theCooperativeGesturesHandler
calledshouldPreventWheelEvent
which is used internally for deciding whether to show the cooperative gestures message, and from theScrollZoomHandler::wheel
method, to determine whether or not to handle the gesture in the map.Launch Checklist
CHANGELOG.md
under the## main
section.