Home > @jsplumbtoolkit/browser-ui-angular > BasePortComponent
BasePortComponent class
The base class for components used to render ports. You must extend this component if you use a component for rendering ports. Your extension of this component needs to declare a constructor that takes an ElementRef. When you call the port component you need to pass the port's backing data as obj and its parent node/group component as parent.
Signature:
export declare abstract class BasePortComponent
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(el) | BasePortComponent requires an ElementRef to be passed in. |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| el | ElementRef | ||
| obj | ObjectData | Data object for the port. Required. | |
| parent | BaseNodeComponent | Parent node (or group) component. Required. |
Methods
| Method | Modifiers | Description |
|---|---|---|
| getPort() | Returns the Port backing this component. | |
| getPortId() | Returns the ID of the port. This is the ID of the port on its node, not the unique id of the port across the entire graph. | |
| removePort() | Removes the port backing this component from the data model and from the UI. | |
| updatePort(data) | Updates the data for the port backing this component, redrawing the component. |