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

bindContextMenu and relatedTarget

Open SellingSystems opened this issue 2 years ago • 1 comments

Hi, I have bound a menu to layers in a geoJSON onEachFeature but the related target comes back as undefined:

layer.bindContextMenu({
		contextmenu: true,
		contextmenuInheritItems: false,
		contextmenuItems: [{
				text: "Edit",
				callback: function(e) {
					console.log(e.relatedTarget)
				}
			}
		]

})

SellingSystems avatar May 15 '22 18:05 SellingSystems

I'm also struggling with how to reference the items with a setDisabled() call. Is this repository still supported? Understand if not.

SellingSystems avatar May 16 '22 09:05 SellingSystems