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

Wax + Leaflet + IOS: Leaflet zoom control mouse/touch events propagating to map (solved) #174

Open
fredleefarr opened this issue Mar 14, 2012 · 0 comments

Comments

@fredleefarr
Copy link

This is perhaps more related to Leaflet than wax. When clicking the zoom controls, if the zoom button was over a utfGrid clickable area, then both the map would zoom as well as wax handing a click event.

To solve this, in leaflet.js "_createButton" where the zoom control buttons are created, I added the following to prevent propagation:

L.DomEvent.addListener(link, 'mousedown', L.DomEvent.stopPropagation);
L.DomEvent.addListener(link, 'mouseup', L.DomEvent.stopPropagation);

L.DomEvent.addListener(link, 'touchstart', L.DomEvent.stopPropagation);
L.DomEvent.addListener(link, 'touchend', L.DomEvent.stopPropagation);

Which seems to have fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant