Home > @jsplumbtoolkit/browser-ui > Surface > centerOn
Surface.centerOn() method
Takes a node/group as argument and positions the surface canvas such that the given node is at the center in both axes.
Signature:
centerOn(element: string | Vertex | Element): void;
Parameters
Parameter | Type | Description |
---|---|---|
element | string | Vertex | Element | The element to center. Can be a DOM element, vertex id, or a Node/Group. |
Returns:
void