Home > @jsplumbtoolkit/core > JsPlumbToolkit > addNewPort
JsPlumbToolkit.addNewPort() method
Adds a new Port to some Node. This will call the current portFactory to get the data for a new Port.
Signature:
addNewPort(obj: string | Node | Group, type: string, portData?: ObjectData, doNotFireEvent?: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| obj | string | Node | Group | node/group or id of the node/group to add a new Port to. |
| type | string | Type of Port to add. |
| portData | ObjectData | Data to pass to the PortFactory. |
| doNotFireEvent | boolean |
Returns:
void