Skip to main content
BaseZoomToFitOptions
Base Options for the zoomToFit methods.
NameTypeDescription
alignX?CanvasAlignmentXHow to align the content in the X axis - left, right or center
alignY?CanvasAlignmentYHow to align the content in the Y axis - top, bottom or center
doNotAnimate?booleanIf true, don't animate while centering. Defaults to false, ie. the operation will be animated.
fill?numberA 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.
onComplete?(p:PointXY) => anyOptional function to call on operation complete.
padding?numberBlank space to leave around the content