zooming and panning is one of the popular interactions, helps focus on the region of interest. I2Djs provides an intuitive way to define the zoom behavior on SVG, Canvas, and webGL layers. I2Djs support multiple interactions as specified below:
Panning: Click and drag, Touch.
Zoom: On the spin wheel, Pinch(2 pointer event), vertical scroll.
zoomStart: Triggered on zoom start.
zoom: Triggered continuously on zoom. It will be triggered after zoomStart till zoomEnd.
zoomEnd: Triggered once on zoom ends.
zoomInstance.scaleExtent([minScale, MaxScale]);
zoomInstance.panExtent([topLeft
[x, y], bottomRight
[x, y]]);
zoomInstance.zoomTarget(point[x, y]
);
zoomInstance.zoomFactor(value);
zoomInstance.duration();
node.zoomTo(zoomScale
, point
);
node.zoomBy(zoomScale
, point
);
node.panTo(point
)