d3 / d3-zoom

Pan and zoom SVG, HTML or Canvas using mouse or touch input.
https://d3js.org/d3-zoom
ISC License
507 stars 143 forks source link

Panning not working on mobile #123

Closed 03k64 closed 6 years ago

03k64 commented 6 years ago

I've been experiencing an issue when trying to use pan or zoom on mobile devices for a D3 tree chart. I'm unsure of the underlying cause, however downgrading from v1.7.0 to v1.6.0 of this module solved the issue.

The only pointer I've seen to the cause of the issue is the message translateExtent is undefined in this function: https://github.com/d3/d3-zoom/blob/master/src/zoom.js#L42

The issue persists even when I explicitly call the zoom.translateExtent([extent]) function and pass an extent array with relevant data in.

mbostock commented 6 years ago

This bug was fixed in 1.7.1.