layout.rotate
rotate(axis: "x" | "y" | "z", angle: number, nodeIds?: string[]): Promise<void>Rotate nodes around the given axis by angle degrees.
Recorded in history as "SetPositions" or "DragPositions".
Emits "layout:start" and "layout:end".
axis | "x" | "y" | "z" | Axis of rotation: "x", "y", or "z". |
angle | number | Rotation angle in degrees. |
nodeIds | string[] | Subset of nodes to rotate; defaults to all nodes. |
Returns: Promise<void>
Example
await api.layout.rotate("y", 90);