-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Disable drag rotate handler during touch events #2204
Comments
Thanks for the report @DenisCarriere! Could you tell me more about the glitch-iness? What is the exactly map doing? It is hard to tell from the posted gif. cc @bhousel |
Yea I know the GIF wasn't very clear, well just test it out using Google |
Changes to Issue: The error is still the same, however it was the |
My quick fix was to implement a Mobile Detect library and turn off import MobileDetect from 'mobile-detect'
const md = new MobileDetect(window.navigator.userAgent)
// Disable (Mobile)
if (md.mobile()) {
map.dragRotate.disable()
} |
Thanks for the debugging @DenisCarriere! @bhousel do you think we should automatically disable |
Probably a better idea would be to watch for Besides, some devices like new Windows Surface and Chromebooks support both mouse and touch, so the problem isn't just limited to mobile. |
Added a PR. Please review :) #3457 |
I can't reproduce any issues here with 0.44.1. |
When holding down (touch) using a Mobile Device or even using Google Chrome inspect, the map seems to be very glitchy afterwards.
mapbox-gl-js v0.14.3:
Steps to Trigger Behavior
The only way to prevent it from being glitchy was to disable
dragRotate
.But that removes the really cool right click rotate functionality.
I tested this bug using a basic MapboxGL example.
The text was updated successfully, but these errors were encountered: