Home > @jsplumbtoolkit/core > JsPlumbToolkit > removePort
JsPlumbToolkit.removePort() method
Removes a Port from the dataset.
Signature:
removePort(vertexOrId: string | Node | Group | Port, portId?: string): boolean;
Parameters
| Parameter | Type | Description |
|---|---|---|
| vertexOrId | string | Node | Group | Port | If a string is passed in here, it may represent the full ID of some port, ie in "vertex.port" notation, or it may be the ID of the vertex on which the port to be removed resides. If you do not pass a string to this argument you can pass a Port instead, or you can pass the Node/Group on which the port resides (in which case you'll also need to provide a value for portId) |
| portId | string | Id of the port to remove from the given node. Only required if you did not provide a full port ID, or the Port itself, to vertexOrId. |
Returns:
boolean
True if the port existed and was removed, false otherwise.