Zoomist provides some helpful events you can listen.
You can assign event in two ways.
1 . Assign event with on
in options:
2 . Assign event with on
method after initialization:
All available events:
Name | Args | Description |
---|---|---|
ready | (zoomist) | Event will invoked right after initialization.
|
reset | (zoomist) | Event will invoked when |
resize | (zoomist) | Event will invoked when |
beforeDestroy | (zoomist) | Event will invoked before Zoomist destroyed. |
destroy | (zoomist) | Event will invoked on Zoomist destroy. |
beforeUpdate | (zoomist) | Event will invoked before Zoomist updated. |
update | (zoomist) | Event will invoked on Zoomist update. |
zoom | (zoomist, scale) | Event will invoked when zooming. |
wheel | (zoomist, scale, event) | Event will invoked when mouse wheeling. (Only works on desktop.) |
dragStart | (zoomist, transform, event) | Event will invoked on drag start. |
drag | (zoomist, transform, event) | Event will invoked when dragging. |
dragEnd | (zoomist, transform, event) | Event will invoked on drag end. |
pinchStart | (zoomist, scale, event) | Event will invoked on pinch start. (Only works on mobile.) |
pinch | (zoomist, scale, event) | Event will invoked when pinching. (Only works on mobile.) |
pinchEnd | (zoomist, scale, event) | Event will invoked on pinch end. (Only works on mobile.) |
slideStart | (zoomist, value, event) | Event will invoked on slider slide start. |
slide | (zoomist, value, event) | Event will invoked when slider is sliding. |
slideEnd | (zoomist, value, event) | Event will invoked on slider slide end. |