Optional
autoOptional
defaultDefault zoom, used at setup. If a zoom if stored in localStorage, the default zoom is ignored.
The element that can be zoomed in/out.
Optional
localThe key used to persist the zoom level on localStorage. Default (unset) is no storage.
Optional
onFunction called when the element dimensions changes, or after a zoom change. This function can be called a lot of times, don't forget to debounce it if used.
Optional
onFunction called when the zoom changes.
Optional
smoothSmooth transition when changing zoom level. Default true.
Optional
throttleThrottle time, in ms, for resize events, to avoid event spamming. Default is 100ms.
Optional
zoomOptions of the zoom controls.
Optional
zoomAn array of zoom levels for the zoomIn/zoomOut methods. Default is [0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1]
Generated using TypeDoc
Options of the auto zoom. If provided, will automatically change the zoom when the window width changes so expectedWidth is available on the rescaled element.