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

Does it support touch devices? #42

Open
vijaythummar opened this issue May 21, 2018 · 1 comment
Open

Does it support touch devices? #42

vijaythummar opened this issue May 21, 2018 · 1 comment

Comments

@vijaythummar
Copy link

Can we integrate context menu for touch devices?

@patorjk
Copy link
Owner

patorjk commented May 21, 2018

I haven't tested it in touch devices, but it should work on them. Just attach the appearance of the menu to the event you want (see the examples). For example:

.on('contextmenu', d3.contextMenu(menu)); // attach menu to element

That attaches the menu to the right-click event ("contextmenu"). You could change "contextmenu" to "click" and it should cause the menu to appear when the object is clicked/touched.

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

2 participants