This module is the core module that implements the sugiyama style graph drawing based on popular js library dagrejs.
This module assumes graphs are defined using elm-community/graph module.
This is the main function that computes the layout for a graph using sugiyama style graph drawing.
This function takes a list of Dagre Attributes and a graph and outputs the layout.
-- simpleGraph = Graph from Readme (or any graph)
runLayout [] simpleGraphAll the computed coordinates lie between (0,0) and (width,height).
In simple terms, you can set viewBox 0 0 width height in the svg.
This represents the default configuration of runLayout function. For more details about configuring a layout please see Dagre.Attributes
This type represents the record returned by the runLayout function.
The width and height fields represent the width and height of graph.
The coordDict contains the dictionary that maps node-ids to the coordinates on cartesian plane.
The controlPtsDict contains a dictionary that maps edges to its control/bend points (list of node-ids)