Creates a coordinate assignment.
the minimum buffer between cells on the same rank interRankCellSpacing
the minimum distance between cells on adjacent ranks
the position of the root node(s) relative to the graph
the leftmost coordinate node placement starts at
The size of the vertical buffer in the center of inter-rank channels where edge control points should not be placed Default is 4.
The sum of x-displacements for the current iteration
Whether or not to perform local optimisations and iterate multiple times through the algorithm. Default is true.
Padding added to resized parents Default is 10.
The minimum x position node placement starts at
The minimum distance between cells on adjacent ranks. Default is 100.
The minimum buffer between cells on the same rank. Default is 30.
Map of internal edges and (x,y) pair of positions of the start and end jetty for that edge where it connects to the source and target vertices. Note this should technically be a WeakHashMap, but since JS does not have an equivalent, housekeeping must be performed before using. i.e. check all edges are still in the model and clear the values. Note that the y co-ord is the offset of the jetty, not the absolute point
Reference to the enclosing
The maximum x value this positioning lays up to
The number of heuristic iterations to run. Default is 8.
The minimum distance for an edge jetty from a vertex Default is 12.
A store of connections to the layer above for speed
The position of the root ( start ) node(s) relative to the rest of the laid out graph. Default is <mxConstants.DIRECTION.NORTH>.
The distance between each parallel edge on each ranks for long edges. Default is 10.
The preferred horizontal distance between edges exiting a vertex Default is 5.
The preferred vertical offset between edges exiting a vertex Default is 2.
A store of connections to the layer below for speed
Internal cache of bottom-most value of Y for each rank
Internal cache of top-most values of Y for each rank
The width of all the ranks
The Y-coordinate of all the ranks
The rank that has the widest x position
The X-coordinate of the edge of the widest rank
Calculates the priority the specified cell has based on the type of its cell and the cells it is connected to on the next layer
the cell whose weight is to be calculated
the cells the specified cell is connected to
Calculates the width rank in the hierarchy. Also set the y value of each rank whilst performing the calculation
the facade describing the input graph
an internal model of the hierarchical layout
Sets up the layout in an initial positioning. The ranks are all centered as much as possible along the middle vertex in each rank. The other cells are then placed as close as possible on either side.
the facade describing the input graph
an internal model of the hierarchical layout
Separates the x position of edges as they connect to vertices
the layout model
Performs one median positioning sweep in one direction
the iteration of the whole process
an internal model of the hierarchical layout
Calculates the median position of the connected cell on the specified rank
the cells the candidate connects to on this level
the layer number of this rank
Performs one median positioning sweep in both directions
Straightens out chains of virtual nodes where possibleacade to those stored after this layout processing step has completed.
the facade describing the input graph
an internal model of the hierarchical layout
Hook to add additional processing
the hierarchical model edge
the real edge in the graph
Sets up the layout in an initial positioning. All the first cells in each rank are moved to the left and the rest of the rank inserted as close together as their size and buffering permits. This method works on just the specified rank.
the current rank being processed
the facade describing the input graph
an internal model of the hierarchical layout
Performs median minimisation over one rank.
the layer number of this rank
an internal model of the hierarchical layout
the layer number whose connected cels are to be laid out relative to
Determines whether or not a node may be moved to the specified x position on the specified rank
the layout model
the cell being analysed
the layer of the cell
the x position being sought
Sets the cell locations in the facade to those stored after this layout processing step has completed.
the input graph
the layout model
Fixes the control points
Fixes the position of the specified vertex.
the vertex to position
Sets the horizontal locations of node and edge dummy nodes on each layer. Uses median down and up weightings as well as heuristics to straighten edges as far as possible.