ank5
asked on
Prevent Zoom in when double clicking
In some of my D3 graphs, I am facing a problem. When I double click on the graph, it zooms in and the graph becomes larger. I need to keep the double click behavior but don't want the zoom to happen.
Also, I do want to keep the zoom behavior when user uses the mouse scroll. Right now both mouse scroll and double clicking results in a zoom.
Below is an example
http://jsfiddle.net/94pgg33y/90/
Doubling clicking a node zooms in the diagram and so does using the mouse scroll. I need to disable the double click zoom while keeping the mouse zoom. Also, I don't want to disable the double click event itself (eventually I would be using the double click event to pop out windows based on the node that is double clicked.)
Also, I do want to keep the zoom behavior when user uses the mouse scroll. Right now both mouse scroll and double clicking results in a zoom.
Below is an example
http://jsfiddle.net/94pgg33y/90/
Doubling clicking a node zooms in the diagram and so does using the mouse scroll. I need to disable the double click zoom while keeping the mouse zoom. Also, I don't want to disable the double click event itself (eventually I would be using the double click event to pop out windows based on the node that is double clicked.)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.