panzoom
panzoom copied to clipboard
add zoomToCenter public API
Adds a zoomToCenter function
-
zoomToCenter(1.2)
Zooms in by 20% -
zoomToCenter(0.8)
Zooms out by 20%
I wanted more granular control than using the delta -1 or +1 and comparing by zoomSpeed. Especially if using this with a + or - button to zoom it makes sense to have it defined like this.