Increments the current zoom by a specific amount
Note: Limited by max_zoom
and min_zoom
panHandler.zoom(3);
// Zoom is now set to 3x magnification
panHandler.incrementZoom(0.5);
// Zoom is now set to 3.5x magnification
panHandler.incrementZoom(-3);
// Zoom is now set to 0.5x magnification
Pans the canvas by (x, y) amount, scaled for the current zoom level to maintain visual expectations.
Sets the zoom to an exact level.
Note: Limited by max_zoom
and min_zoom
panHandler.zoom(3);
// Zoom is now set to 3x magnification
panHandler.zoom(0.5);
// Zoom is now set to 0.5x magnification
Generated using TypeDoc
Clears the canvas. Should be called before each redraw after modifying zoom or pan.