Skip to main content

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

Surface.centerOnVertically() method

Takes a node/group as argument and positions the surface canvas such that the given node is at the center in the vertical axis.

Signature:

centerOnVertically(element: string | Vertex | Element): void;

Parameters

ParameterTypeDescription
elementstring | Vertex | ElementThe element to center. Can be a DOM element, vertex id, or a Node/Group

Returns:

void