Disable panning on right click

216 views
Skip to first unread message

Luis Farzati

unread,
Nov 22, 2012, 12:22:04 PM11/22/12
to d3...@googlegroups.com
I'm looking at Mike's example of zoom behavior over a map: http://bl.ocks.org/2322933, and I can't seem to find a way to avoid initiating a panning when the right button is clicked. I right-click over the map, the context menu appears correctly, but the pan behavior is also triggered.

Doing preventDefault() or stopPropagation() doesn't work. Any ideas?

Jonathan Cohn

unread,
Nov 29, 2012, 11:33:56 AM11/29/12
to d3...@googlegroups.com
I haven't seen an example yet that utilizes right clicking, but I am very interested in this as well

Evan Worley

unread,
Nov 29, 2012, 3:38:58 PM11/29/12
to d3...@googlegroups.com
Hi guys,

I have a pull request which does not initial zooming (panning) on right click. More details at https://github.com/mbostock/d3/pull/933

- Evan
Reply all
Reply to author
Forward
0 new messages