EdgeRouting
Interface for routing implementations
Properties
Section titled “Properties”name:
string
Name identifier for the routing.
Methods
Section titled “Methods”computePointOnPath()?
Section titled “computePointOnPath()?”
optionalcomputePointOnPath(points,percentage):Point
Gets a point on the path at a given percentage (0-1). Useful for positioning labels, decorations, or interaction handles.
Parameters
Section titled “Parameters”points
Section titled “points”Point[]
The points defining the path.
percentage
Section titled “percentage”number
Position along the path (0 = start, 1 = end).
Returns
Section titled “Returns”The point at the given percentage along the path.
computePoints()
Section titled “computePoints()”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.
Parameters
Section titled “Parameters”context
Section titled “context”The routing context containing source/target info and layout state.
config?
Section titled “config?”Optional configuration parameters for routing behavior.
Returns
Section titled “Returns”Point[]
An array of points representing the routed edge path.
computeSvgPath()
Section titled “computeSvgPath()”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.
Parameters
Section titled “Parameters”points
Section titled “points”Point[]
The points defining the edge path.
config?
Section titled “config?”Optional configuration parameters for path generation.
Returns
Section titled “Returns”string
An SVG path string.