if true, the layout will not permit overlaps of the node bounding boxes (defined by the width and height properties on nodes)
list of constraints of various types
Default size (assume nodes are square so both width and height) to use in packing if node width/height are not specified.
Matrix of ideal distances between all pairs of nodes. If unspecified, the ideal distances for pairs of nodes will be based on the shortest path distance between them.
causes constraints to be generated such that directed graphs are laid out either from left-to-right or top-to-bottom. a separation constraint is generated in the selected axis for each edge that is not involved in a cycle (part of a strongly connected component)
'x' for left-to-right, 'y' for top-to-bottom
either a number specifying a minimum spacing required across all links or a function to return the minimum spacing for each link
The strength of attraction between the group boundaries to each other.
if true, the final step of the start method will be to nicely pack connected components of the graph. works best if start() is called with a reasonable number of iterations specified and each node has a bounding box (defined by the width and height properties on nodes).
compute an ideal length for each link based on the graph structure around that link. you can use this (for example) to create extra space around hub-nodes in dense graphs. In particular this calculation is based on the "symmetric difference" in the neighbour sets of the source and target: i.e. if neighbours of source is a and neighbours of target are b then calculation is: |a intersection b|/|a union b| Actual computation based on inspection of link structure occurs in start(), so links themselves don't have to have been assigned before invoking this function.
links have an ideal distance, The automatic layout will compute layout that tries to keep links (AKA edges) as close as possible to this length.
find a route avoiding node bounds for the given edge. assumes the visibility graph has been created (by prepareEdgeRouting method) and also assumes that nodes have an index property giving their position in the node array. This index property is created by the start() method.
Size of the layout canvas dimensions [x,y]. Currently only used to determine the midpoint which is taken as the starting position for nodes with no preassigned x and y.
start the layout process
compute an ideal length for each link based on the graph structure around that link. you can use this (for example) to create extra space around hub-nodes in dense graphs. In particular this calculation is based on the "symmetric difference" in the neighbour sets of the source and target: i.e. if neighbours of source is a and neighbours of target are b then calculation is: sqrt(|a union b| - |a intersection b|) Actual computation based on inspection of link structure occurs in start(), so links themselves don't have to have been assigned before invoking this function.
iterate the layout. Returns true when layout converged.
Generated using TypeDoc
Main interface to cola layout.
Layout