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

bindContextMenu and relatedTarget #142

Open
SellingSystems opened this issue May 15, 2022 · 1 comment
Open

bindContextMenu and relatedTarget #142

SellingSystems opened this issue May 15, 2022 · 1 comment

Comments

@SellingSystems
Copy link

SellingSystems commented May 15, 2022

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
Copy link
Author

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

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

No branches or pull requests

1 participant