Skip to main content

BasePortComponent

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

O = ObjectData

Implements

  • OnInit
  • OnDestroy

Methods

getPort()

getPort(): Port

Returns the Port backing this component.

Returns

Port

Class Method


getPortId()

getPortId(): string

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

Class Method


removePort()

removePort(): void

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

Returns

void

Class Method


updatePort()

updatePort(data): void

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

Parameters

data

ObjectData

Data to update port with.

Returns

void

Class Method

Properties

$data

readonly $data: WritableSignal<O>

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

Class Member


data

data: O

Data object for the port. Required.

Input


parent

parent: BaseVertexComponent<Node | Group>

Parent node (or group) component. Required.

Input