-
Notifications
You must be signed in to change notification settings - Fork 60
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
two finger drag / page scroll prevention and glitchy panning #65
Comments
I'm also running into this. When you start dragging around with two fingers, Specifically, this line enables interaction with the map:
That function dynamically enables dragging and zooming and tapping. Doing this adds some CSS classes to the Leaflet container which ends up setting the In the case of Leaflet.GestureHandling, however, the CSS property is only set while you're already in a touch event handler. That runs into the caveat mentioned on MDN:
So the CSS change is too late, the browser is not told not to handle the panning and the page scrolls. In this case, the default browser action can only be prevented from happening by calling |
Hi Guys
I'm getting pretty poor performance using this on mobile. I created a stackoverflow post here but did not any inputs.
Post copied below:
"I'm using leaflet.gesturehandling with react to support two finger scroll and ctrl+scroll-wheel with leaflet.
Testing this feature using the demo i see that on desktop all is well. On mobile however, i find the behaviour is pretty eratic. the page will scroll when trying to use two finger gestures. zooms are mixed with pans and it is just plain unpredictable. I've included my implementation which i think follows the authors guidance.
see screengrab here:
I'm wondering, have i done something wrong here? Do i need to disable page scrolling while two fingers are in contact with the leaflet container?
has anyone come accross this?
The text was updated successfully, but these errors were encountered: