Hi,
To fix the zoom problem which didn't work with the mousewheel I
patched the src/behavior/zoom.js in d3.
42,43c42,44
< if (!d3_behavior_zoomZooming) d3_behavior_zoomZooming =
d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));
< d3_behavior_zoomTo(d3_behavior_zoomDelta() + xyz[2],
d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomZooming);
---
> var mouse = d3.svg.mouse(d3_behavior_zoomTarget);
> d3_behavior_zoomZooming = d3_behavior_zoomLocation(mouse);
> d3_behavior_zoomTo(d3.event.wheelDelta < 0 ? Math.ceil(xyz[2] - 1)*0.7 : Math.floor(xyz[2] + 1)*0.7, mouse, d3_behavior_zoomZooming);
So basically I'm just checking if the wheelDelta of the d3.event is a
wheelup or a wheeldown and make the zoom accordingly like in the
dbclick() callback.
I still have my problem with panning after dragging nodes. It's buggy.
The mouse is coming back to the last "mousedown" position where I
dragged my node. After that everything is working great.
Thanks,