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".
offset | object | Translation vector { x, y, z? } (z defaults to 0). |
nodeIds | string[] | Subset of nodes to shift; defaults to all nodes. |
Returns: Promise<void>
Example
await api.layout.shift({ x: 100, y: 0 });