Home > @jsplumbtoolkit/browser-ui > Surface > centerOnHorizontally
Surface.centerOnHorizontally() method
Takes a node/group as argument and positions the surface canvas such that the given node is at the center in the horizontal axis.
Signature:
centerOnHorizontally(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