Skip to main content

Home > @jsplumbtoolkit/core > Selection > toggle

Selection.toggle() method

Toggles the given object's membership in the current selection. If obj is a Path, then the individual members of the Path are toggled independently.

Signature:

toggle(obj: string | Array<string> | Base | Array<Base> | Path | Selection, evtPipe?: any): any[];

Parameters

ParameterTypeDescription
objstring | Array<string> | Base | Array<Base> | Path | SelectionObject(s) to add. May take many forms - a Group, Group Id, Node, Node Id, or Edge, or a list of these, or a Path.
evtPipeany

Returns:

any[]