nodes

nodes.pin

pin(selector: NodeSelector): Promise<void>

Pin the selected nodes so layout algorithms do not move them.

Accepts any NodeSelector shape. Recorded in history as "PinNodes". Does not emit an event.

selectorNodeSelectorIdentifies the node(s) to pin.

Returns: Promise<void>

Example

await api.nodes.pin(["s1", "s2"]);