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

Support contextmenu (for enabling right click events) #288

Closed
jejay opened this issue Jun 21, 2017 · 2 comments
Closed

Support contextmenu (for enabling right click events) #288

jejay opened this issue Jun 21, 2017 · 2 comments

Comments

@jejay
Copy link

jejay commented Jun 21, 2017

As far as I have understood, Mapbox does not fire a click event when a right click occurs. Instead it fires a contextmenu event. See mapbox/mapbox-gl-js#1416

My Problem now is, that the contextmenu event seems to be not supported by react-map-gl. So I cant listen to right click events.

I suggest a onContextmenu-prop on the InteractiveMap that consumes a callback.

@wuweiweiwu
Copy link

React provides a synthetic event wrapper for onContextMenu

So it'd be relatively straightforward to add a prop to mapbox that is passed into / or bound to the internal dom ref

@Pessimistress
Copy link
Collaborator

Added in 3.2.9

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

3 participants