Skip to main content

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

ParameterTypeDescription
nodeNode | Group | string | ObjectDataNode to add
groupGroup | string | ObjectDataGroup to add the Node/Group to
sourceGroupGroupOptional Group the Node previously belonged to.
positionPointXYOptional previous position of the Node in sourceGroup.
sourceToolkitRenderer<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.