layout

layout.shift

shift(offset: object, nodeIds?: string[]): Promise<void>

Translate node positions by the given offset vector.

Recorded in history as "SetPositions" or "DragPositions". Emits "layout:start" and "layout:end".

offsetobjectTranslation vector { x, y, z? } (z defaults to 0).
nodeIdsstring[]Subset of nodes to shift; defaults to all nodes.

Returns: Promise<void>

Example

await api.layout.shift({ x: 100, y: 0 });