Skip to main content

ZoomToFitOptions

Options for the zoomToFit method.

Extends​

Properties​

alignX?​

optional alignX: CanvasAlignmentX

How to align the content in the X axis - left, right or center

Inherited from​

BaseZoomToFitOptions.alignX


alignY?​

optional alignY: CanvasAlignmentY

How to align the content in the Y axis - top, bottom or center

Inherited from​

BaseZoomToFitOptions.alignY


doNotAnimate?​

optional doNotAnimate: boolean

If true, don't animate while centering. Defaults to false, ie. the operation will be animated.

Inherited from​

BaseZoomToFitOptions.doNotAnimate


doNotZoomIfVisible?​

optional doNotZoomIfVisible: boolean

If the content is all already visible, do not make any changes to zoom.


fill?​

optional fill: number

A decimal between 0 and 1, which indicates how much of the viewport size the content will take up. This value is applied as a ratio of the width or height of the viewport - whichever is smaller. The default is 0.9.

Inherited from​

BaseZoomToFitOptions.fill


onComplete()?​

optional onComplete: (p) => any

Optional function to call on operation complete.

Parameters​

p​

PointXY

Returns​

any

Inherited from​

BaseZoomToFitOptions.onComplete


padding?​

optional padding: number

Blank space to leave around the content

Inherited from​

BaseZoomToFitOptions.padding