selection

selection.toggleNodes

toggleNodes(nodeIds: string[]): Promise<void>

Toggle the selected state of each given node id individually.

Selected nodes become deselected and vice-versa. Not undoable. Emits "selection:changed".

nodeIdsstring[]Ids whose selection state should be toggled.

Returns: Promise<void>

Example

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