Skip to main content

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

ConstructorModifiersDescription
(constructor)(el)BasePortComponent requires an ElementRef to be passed in.

Properties

PropertyModifiersTypeDescription
elElementRef
objObjectDataData object for the port. Required.
parentBaseNodeComponentParent node (or group) component. Required.

Methods

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