Skip to content

EdgeRouting

Interface for routing implementations

name: string

Name identifier for the routing.

optional computePointOnPath(points, percentage): Point

Gets a point on the path at a given percentage (0-1). Useful for positioning labels, decorations, or interaction handles.

Point[]

The points defining the path.

number

Position along the path (0 = start, 1 = end).

Point

The point at the given percentage along the path.


computePoints(context, config?): Point[]

Computes the points for the edge path. This is the core routing logic that determines how an edge is drawn between source and target.

EdgeRoutingContext

The routing context containing source/target info and layout state.

EdgeRoutingConfig

Optional configuration parameters for routing behavior.

Point[]

An array of points representing the routed edge path.


computeSvgPath(points, config?): string

Generates an SVG path string from points. Converts the routed points into a valid d attribute for an <path> SVG element.

Point[]

The points defining the edge path.

EdgeRoutingConfig

Optional configuration parameters for path generation.

string

An SVG path string.