Skip to main content

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

Surface.setVertexPosition() method#

Set the position of the given node/group, updating the pan/zoom bounds and repainting any edges attached to the given vertex.

Signature:

setVertexPosition(vertex: string | Node | Group | Element, left: number, top: number): void;

Parameters#

ParameterTypeDescription
vertexstring | Node | Group | ElementEither a vertex ID, or a Node/Group or a DOM element.
leftnumberPosition in X axis to set
topnumberPosition in Y axis to set

Returns:

void