Search Docs
Loading...
Skip to content

Type Alias: ZoomOutAction

type ZoomOutAction = (options?) => void | Promise<void>;

Action function for zooming out by one step

Zoom levels are per CSS pixel, so 1 is 100% on every screen. engine.scene.getZoomLevel() is in device pixels: divide it by window.devicePixelRatio to compare it with these levels.

Parameters#

Parameter Type Description
options? { stepSize?: number; animate?: boolean
options.stepSize? number Custom step size for zoom out (default uses predefined steps)
options.animate? boolean
options.minZoom? number Minimum allowed zoom level (default: 0.125)

Returns#

void | Promise<void>