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 moreapplyEdgeChanges()
The applyEdgeChanges util applies an array of edge changes to an array of edges and returns the next array — for a controlled flow.
Read moreapplyNodeChanges()
The applyNodeChanges util applies an array of node changes to an array of nodes and returns the next array — for a controlled flow.
Read moregetBezierPath()
The getBezierPath util returns an SVG path for a bezier edge along with the coordinates of its label.
Read moregetConnectedEdges()
The getConnectedEdges util returns every edge connected to any of the given nodes.
Read moregetIncomers()
The getIncomers util returns the source nodes directly connected to a given node.
Read moregetNodesBounds()
The getNodesBounds util returns the bounding rectangle that contains all of the given nodes.
Read moregetOutgoers()
The getOutgoers util returns the target nodes directly connected to a given node.
Read moregetSimpleBezierPath()
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 moregetSmoothStepPath()
The getSmoothStepPath util returns an SVG path for a smooth-step (or step) edge along with the coordinates of its label.
Read moregetStraightPath()
The getStraightPath util returns an SVG path for a straight edge along with the coordinates of its label.
Read moregetViewportForBounds()
The getViewportForBounds util computes the viewport (x, y, zoom) needed to fit a given bounding rectangle into the flow.
Read moreisEdge()
The isEdge util is a type guard that returns true when a flow element is an edge.
Read moreisNode()
The isNode util is a type guard that returns true when a flow element is a node.
Read morereconnectEdge()
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