zakjan / leaflet-lasso

Lasso selection plugin for Leaflet
https://zakjan.github.io/leaflet-lasso/
MIT License
111 stars 21 forks source link

Stop event propagation on mouse events #47

Closed hoetmaaiers closed 2 years ago

hoetmaaiers commented 2 years ago

I don't want the mouse events to propagate through to leaflet when using the lasso selection.

Concrete example:

  1. lasso select geojson paths
  2. select using lasso and click (shift to add to selection)
  3. when clicking outside the selection this should trigger the leaflet click to deselect.

Without stopping the propagation, every lasso event triggers a leaflet mouse event. Maybe this should be configurable, but I can't think of a scenario when I would need the propagation?

zakjan commented 2 years ago

Thanks, makes sense, merged.