Skip to main content

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

ConstructorModifiersDescription
(constructor)(props)Constructs a new instance of the BasePortComponent class

Properties

PropertyModifiersTypeDescription
propsP
stateS
surfaceSurface
toolkitJsPlumbToolkit
vertexNode | Group

Methods

MethodModifiersDescription
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.