selection

selection.selectNodes

selectNodes(nodeIds: string[], mode: SelectionMode): Promise<void>

Select nodes using the given mode.

Not undoable — selection is intentionally outside the undo stack. Emits "selection:changed".

nodeIdsstring[]Ids of the nodes to act on.
modeSelectionModeHow the new ids interact with the current selection; defaults to "replace".

Returns: Promise<void>

Example

await api.selection.selectNodes(["s1", "s2"], "add");