selection
6 functions / 0 types
Index
| Function | Description |
|---|---|
| clear | Clear all nodes from the selection. |
| popNode | Pop the most recently selected node from the selection (the same node lastSelected reads). |
| pushNode | Push a node onto the selection, starting a new selection if none exists. |
| read | Read the current selection, returning the non-empty selected nodes in slot order. |
| setSelection | Replace the entire selection with a new ordered list of nodes. |
| setSlot | Set a specific selection slot by index. |
clear
clear(transactionId?: string): Promise<void>Clear all nodes from the selection.
Returns Promise<void>.
transactionId optional : string
popNode
popNode(transactionId?: string): Promise<ProjectObjectProjectNode | undefined>Pop the most recently selected node from the selection (the same node lastSelected reads).
Returns Promise<ProjectObjectProjectNode | undefined>.
transactionId optional : string
pushNode
pushNode(args: { node: ProjectObjectProjectNode }, transactionId?: string): Promise<void>Push a node onto the selection, starting a new selection if none exists.
Returns Promise<void>.
node : ProjectObjectProjectNode
The node to push.
transactionId optional : string
read
read(transactionId?: string): Promise<Array<ProjectObjectProjectNode>>Read the current selection, returning the non-empty selected nodes in slot order.
Returns Promise<Array<ProjectObjectProjectNode>>.
transactionId optional : string
setSelection
setSelection(args?: { nodes?: Array<ProjectObjectProjectNode> }, transactionId?: string): Promise<void>Replace the entire selection with a new ordered list of nodes.
Returns Promise<void>.
nodes optional : Array<ProjectObjectProjectNode>
The nodes to select, in slot order.
transactionId optional : string
setSlot
setSlot(args: { index: bigint; node?: ProjectObjectProjectNode }, transactionId?: string): Promise<void>Set a specific selection slot by index.
A node fills the slot, and an absent node clears it. The selection grows with empty slots when
index is beyond its current length.
Returns Promise<void>.
index : bigint
Slot index to set.
node optional : ProjectObjectProjectNode
The node to place in the slot. An absent node clears the slot.
transactionId optional : string