Leaflet.contextmenu icon indicating copy to clipboard operation
Leaflet.contextmenu copied to clipboard

default relatedTarget to map so its object can be accessed directly from the callback event

Open cmoffroad opened this issue 2 years ago • 0 comments

I have a use case where a map based context menu item callback function is coming from another source file that does not have access to the actual Leaflet map object.

Defaulting the event relatedTarget to the original map solve this issue. Another solution would be to have an extra property like target that would would always point to the original map object.

cmoffroad avatar Sep 03 '22 14:09 cmoffroad