Home > @jsplumbtoolkit/core > JsPlumbToolkit > addToGroup
JsPlumbToolkit.addToGroup() method
Adds a Node/Group to a Group.
Signature:
addToGroup(node: Node | Group | string | ObjectData, group: Group | string | ObjectData, sourceGroup?: Group, position?: PointXY, source?: ToolkitRenderer<any>): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
node | Node | Group | string | ObjectData | Node to add |
group | Group | string | ObjectData | Group to add the Node/Group to |
sourceGroup | Group | Optional Group the Node previously belonged to. |
position | PointXY | Optional previous position of the Node in sourceGroup . |
source | ToolkitRenderer<any> | For internal use. Identifies the renderer that instigated this model change. This renderer will not subsequently respond to the model change, since it already knows about it and its UI has been changed accordingly already. |
Returns:
boolean
True if added, false otherwise.