Skip to main content

Interface: ZoomOptions

Options for the behavior of operation affecting scale on the canvas.

Properties

PropertyTypeDescription

fitPadding?

number

Padding from each viewport border for zoom-to-fit scaling.

Default

20

max?

number

Maximum scale factor.

Default

2

maxFit?

number

Same as max but used only for zoom-to-fit to limit the scale factor on small diagrams.

Default

1

min?

number

Minimum scale factor.

Default

0.2

requireCtrl?

boolean

Whether Ctrl/Cmd keyboard key should be held to zoom with the mouse wheel.

If true, the mouse wheel will be used to scroll viewport horizontally or vertically if Shift is held; otherwise the wheel action will be inverted.

Default

true

step?

number

Scale step for the zoom-in and zoom-out operations.

Default

0.1