Skip to main content

Home > @jsplumbtoolkit/core > JsPlumbToolkit > addFactoryGroup

JsPlumbToolkit.addFactoryGroup() method#

Adds a Group by type, running the data generation for the node through the current GroupFactory. This is different from addGroup in that with addGroup you are supplying the final data and your GroupFactory is not called. This method can be called with one, two or three arguments. A single argument is considered to be the new Group's type, and a backing data object will be created with this set, and no callback will occur. If you provide two arguments the second argument may be either the new Group's backing data OR a callback to hit with the newly created Group. With three arguments the second argument is the Group's backing data and the third is a callback to hit with the newly created Group.


addFactoryGroup(type: string, data?: ObjectData, continueCallback?: Function, abortCallback?: Function): void;


typestringRequired. Type of the object to create. type will be passed as the first argument to your group factory.
dataObjectDataOptional backing data for the Group.
continueCallbackFunctionOptional function to call with the newly created Group.
abortCallbackFunctionOptional function to call if the group factory aborted