Home > @jsplumbtoolkit/browser-ui-react > BasePortComponent
BasePortComponent class
Base class for components that render Ports. Your port components can extend this to get access to a few helper methods. You are expected to supply a parent
Signature:
export declare class BasePortComponent<P extends BasePortProps, S extends BasePortState> extends React.Component<P, S>
Extends: React.Component<P, S>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(props) | Constructs a new instance of the BasePortComponent class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
props | P | ||
state | S | ||
surface | Surface | ||
toolkit | JsPlumbToolkit | ||
vertex | Node | Group |
Methods
Method | Modifiers | Description |
---|---|---|
getPort() | Gets the port that this component represents. | |
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 that this component represents. | |
updatePort(data) | Updates the port that this component represents. |