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
| Parameter | Type | Description |
|---|---|---|
| x | number | Value for pan in x axis |
| y | number | Value for pan in Y axis |
| zoom | number | Value fo zoom |
| animate | boolean | Defaults to false. If true, the changes will be made with the widget animating. |
Returns:
void