selection

selection.deselectNodes

deselectNodes(nodeIds?: string[]): Promise<void>

Deselect nodes, optionally restricted to a given id list.

When called with no argument (or undefined), clears the entire node selection. When called with an id array, only those ids are removed from the selection. Not undoable. Emits "selection:changed".

nodeIdsstring[]Ids to deselect; omit to clear all node selections.

Returns: Promise<void>

Example

await api.selection.deselectNodes(["s1"]); // remove n1 from selection
await api.selection.deselectNodes();       // clear all node selections