Open vijaythummar opened 6 years ago
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.
Can we integrate context menu for touch devices?