Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > setZoomRange

Surface.setZoomRange() method

Sets the current zoom range. By default, this method checks if the current zoom is within the new range, and if it is not then setZoom is called, which will cause the zoom to be clamped to an allowed value in the new range. You can disable this by passing true for doNotClamp.


setZoomRange(zr: ZoomRange, doNotClamp?: boolean): ZoomRange;


zrZoomRangeNew range, as an array consisting of [lower, upper] values. Lower must be less than upper.
doNotClampbooleanIf true, will not check the current zoom to ensure it falls within the new range.



Array of [min, max] current zoom values.