Home > @jsplumbtoolkit/browser-ui > Node > addPort
Node.addPort() method
Adds a Port to the Node.
Signature:
addPort(data: any, idFunction?: IdFunction): Port;
Parameters
Parameter | Type | Description |
---|---|---|
data | any | Optional data backing the Port. This object can be of any type you like. |
idFunction | IdFunction | Optional function that can take a Port's data and return its ID. By default this looks for an id member in the backing data. |
Returns: