Skip to main content

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

Surface.setPanAndZoom() method

Sets the pan and zoom for the Surface in one pass.

Signature:

setPanAndZoom(x: number, y: number, zoom: number, animate?: boolean): void;

Parameters

ParameterTypeDescription
xnumberValue for pan in x axis
ynumberValue for pan in Y axis
zoomnumberValue fo zoom
animatebooleanDefaults to false. If true, the changes will be made with the widget animating.

Returns:

void