Skip to Content

Utils

addEdge()

The addEdge util is a convenience function to add a new edge to an array of edges. It also validates the edge so you don't add an invalid or duplicate one.

Read more

applyEdgeChanges()

The applyEdgeChanges util applies an array of edge changes to an array of edges and returns the next array — for a controlled flow.

Read more

applyNodeChanges()

The applyNodeChanges util applies an array of node changes to an array of nodes and returns the next array — for a controlled flow.

Read more

getBezierPath()

The getBezierPath util returns an SVG path for a bezier edge along with the coordinates of its label.

Read more

getSimpleBezierPath()

The getSimpleBezierPath util returns an SVG path for a simple bezier edge — a smoother curve with no control-point handles — along with its label coordinates.

Read more

getSmoothStepPath()

The getSmoothStepPath util returns an SVG path for a smooth-step (or step) edge along with the coordinates of its label.

Read more

isEdge()

The isEdge util is a type guard that returns true when a flow element is an edge.

Read more

isNode()

The isNode util is a type guard that returns true when a flow element is a node.

Read more

reconnectEdge()

The reconnectEdge util returns a new array of edges with a given edge reconnected to a new source or target, keeping the rest untouched.

Read more
Last updated on