Skip to main content

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

Surface.nudgeZoom() method

Nudges the zoom by the given amount. Zoom will be clamped to the current zoom range in effect and the value that was ultimately set is returned from this function. The value you pass in here is multiplied by 100 to give a percentage value: 1 is 100%, for instance, 0.05 is 5%.

Signature:

nudgeZoom(delta: number, e?: any): number;

Parameters

ParameterTypeDescription
deltanumberAmount to change zoom by.
eanyOriginal event that caused the nudge. May be null.

Returns:

number

The zoom that was set. Zoom will be clamped to the allowed range.