Closed tsiki closed 3 years ago
Confirmed. I have restored pinch-to-zoom in this notebook but… it's very very slow, painful to interact with. Zooming with a scroll gesture is much faster.
I had the same issue. This seemes to be introduces with a fix for preventing dragging with ctrl key. See also d3/d3-drag/issues/62 Since this zooming works as a ctrl+wheel event setting a custom filter like this might help:
d3.zoom().filter(function() {
return (!d3.event.ctrlKey || d3.event.type === 'wheel') && !d3.event.button;
})
This will reanable the old zoom behavior and should not interfere with fix d3/d3-drag/issues/62.
Probably linked to #194
I've updated the test notebook with a modified wheelDelta: when the wheel event is received with ctrlKey, we multiply the value by 5. Now it's more on par with the scroll gesture.
Hello,
It seems https://github.com/d3/d3-zoom/commit/295cb421b1cd1720c5b37722b371211449505402 changed the zooming behavior to filter out any events where control is pressed, but at least in Chrome mac pinch behavior translates to an event where ctrl is true, meaning this change disables mac pinch to zoom by default.
Related SO question: https://stackoverflow.com/questions/59972769/d3-pinch-to-zoom-doesnt-work-in-v5-but-works-in-v4