Skip to content

Edge

since v0.8.0

Interface representing an edge (connection) between nodes in the flow diagram

T extends DataObject = DataObject

readonly optional computedHidden: boolean

ComputedHidden is computed by the system and should not be set manually. The effective visibility of the edge: true when its own hidden flag or a template binding is set, or when either endpoint node is effectively hidden.

1.4.0


readonly optional computedZIndex: number

ComputedZIndex is computed by the system and should not be set manually. The final z-index applied to the DOM element for rendering order. Without zOrder: derived from max(source, target) connected node z-indices. With zOrder: uses the explicit value plus connected node elevation.


data: T

The data associated with the edge.


optional hidden: boolean

Whether the edge is hidden. When not set, the edge is visible.

A hidden edge keeps its geometry, does not block initialization or waitForMeasurements, and is not routed. User interactions ignore it: select-all, box selection and zoomToFit bounds. In the default render mode the edge stays in the DOM with display: none. With virtualization enabled it is removed from the DOM instead. An edge is also effectively hidden when either endpoint node is effectively hidden.

Programmatic APIs such as select and the z-order commands do not skip hidden elements. It is up to the caller whether to use them on hidden elements.

Set by the user; the library only reads it.

computedHidden for the derived effective visibility.

1.4.0


id: string

The unique identifier for the edge.


readonly optional measuredLabels: EdgeLabel[]

MeasuredLabels are computed by the system and should not be set manually. The labels of the edge with computed position and size.


optional points: Point[]

The points of the edge defining the path.


optional relinkable: boolean | EdgeEnd

Whether the user can relink the ends of this edge. true allows both ends, 'source' or 'target' allows only that end, and false allows neither. When not set, linking.defaultRelinkable applies.

Set by the user; the library only reads it.

1.4.0


optional routing: EdgeRoutingName

The routing of the edge.


optional routingMode: RoutingMode

The routing mode of the edge. ‘auto’ (default): Points are computed automatically based on routing algorithm ‘manual’: Points are provided by the user and routing algorithm is used to render the path


optional selected: boolean

Whether the edge is selected


source: string

The source node of the edge. If empty string it will use sourcePosition.


optional sourceArrowhead: string

The id of the source arrowhead of the edge.


optional sourcePort: string

The port of the source node.


optional sourcePosition: Point

The position of the edge start.


target: string

The target node of the edge. If empty string it will use targetPosition.


optional targetArrowhead: string

The id of the target arrowhead of the edge.


optional targetPort: string

The port of the target node.


optional targetPosition: Point

The position of the edge end.


optional temporary: boolean

Whether the edge is temporary.


optional type: string

The type of the edge declared in edgeTemplateMap.


optional zOrder: number

The z-order of the edge. When set, overrides the default edge z-index (which is derived from connected nodes). When a connected node is selected, the node’s elevation is added so the edge stays visible above elevated nodes.

Set by bringToFront / sendToBack commands, or manually.

computedZIndex for the final rendered z-index.