leaflet-routing-machine icon indicating copy to clipboard operation
leaflet-routing-machine copied to clipboard

waypoint drag handler interferes with map click handler

Open noerw opened this issue 5 years ago • 1 comments

When I have a L.Routing.control() instance on a map, and also subscribe to map clicks (map.on('click', console.log)), the map click handler is also fired when clicking on / dragging intermediate waypoints.

This is not true for the first or last waypoint, but any intermediate waypoint. edit: I'm not so sure about that last statement anymore.

noerw avatar Aug 11 '20 22:08 noerw

This is probably true: since the control does not listen to clicks on waypoints, these will fire on the map instead. The drag listener uses mousedown and mouseup, which are separate events.

perliedman avatar Aug 16 '20 21:08 perliedman