Class BasePortComponent<O>

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.

Note that you cannot mix this and LegacyBaseNodeComponent. This component expects its parent to be a BaseNodeComponent or BaseGroupComponent.

Note also that if you implement ngOnInit or ngAfterViewInit you must call the superclass implementation from within your method implementation.

Type Parameters

  • O = ObjectData

Implements

  • OnInit

Constructors

  • BasePortComponent requires an ElementRef to be passed in.

    Type Parameters

    • O = ObjectData

    Parameters

    • el: ElementRef<any>

    Returns BasePortComponent<O>

Methods

  • Returns the Port backing this component.

    Returns Port

  • Returns the ID of the port. This is the ID of the port on its node/group, not the unique id of the port across the entire graph.

    Returns string

  • Removes the port backing this component from the data model and from the UI.

    Returns void

  • Updates the data for the port backing this component, redrawing the component.

    Parameters

    • data: ObjectData

    Returns void

Properties

el: ElementRef<any>
obj: O

Data object for the port. Required.

objSignal: WritableSignal<O> = ...

This signal represents the underlying data for the vertex this component represents.

parent: BaseVertexComponent<Node | Group, ObjectData>

Parent node (or group) component. Required.

Version :