Home > @jsplumbtoolkit/browser-ui > Surface > setPan
Surface.setPan() method
Sets the position of the panned content's origin.
Signature:
setPan(left: number, top: number, animate?: boolean, onComplete?: (p: PointXY) => any): void;
Parameters
Parameter | Type | Description |
---|---|---|
left | number | Position in pixels of the left edge of the panned content. |
top | number | Position in pixels of the top edge of the panned content. |
animate | boolean | Whether or not to animate the pan. Defaults to false. |
onComplete | (p: PointXY) => any | If animate is set to true, an optional callback for the end of the pan |
Returns:
void