Whether or not the tops of cells in each rank should be aligned across the rank
The size of the vertical buffer in the center of inter-rank channels where edge control points should not be placed.
Whether or not to apply the internal tree edge routing.
Reference to the enclosing Graph.
Padding added to resized parents.
Bottom padding added to resized parents.
Left padding added to resized parents.
Right padding added to resized parents.
Top padding added to resized parents.
Specifies the orientation of the layout.
Specifies if edge directions should be inverted.
Holds the levelDistance.
Specifies if the parent location should be maintained, so that the top, left corner stays the same before and after execution of the layout. Default is false for backwards compatibility.
An array of the maximum height of cells (relative to the layout direction) per rank
The minimum distance for an edge jetty from a vertex.
Specifies if the tree should be moved to the top, left corner if it is inside a top-level layer.
The internal node representation of the root cell. Do not set directly , this value is only exposed to assist with post-processing functionality
Holds the nodeDistance.
The parent cell of the layout, if any
A set of the parents that need updating based on children process as part of the layout.
The preferred horizontal distance between edges exiting a vertex.
The preferred vertical offset between edges exiting a vertex.
Specifies if all edge points of traversed edges should be removed.
If the parents should be resized to match the width/height of the children. Default is true.
The cell to use as the root of the tree
Specifies if edges should be sorted according to the order of their opposite terminal cell in the model.
Boolean indicating if the bounding box of the label should be used if it iss available.
Shortcut to Graph#updateGroupBounds with moveGroup set to true.
Starts the actual compact tree layout algorithm at the given node.
Implements GraphLayout.execute.
If the parent has any connected edges, then it is used as the root of the tree. Else, mxGraph.findTreeRoots will be used to find a suitable root node within the set of children of the given parent.
Returns the constraint for the given key and cell. The optional edge and source arguments are used to return inbound and outgoing routing- constraints for the given edge and vertex. This implementation always returns the value for the given key in the style of the given cell.
Key of the constraint to be returned.
Cell whose constraint should be returned.
Optional
edge: CellOptional Cell that represents the connection whose constraint should be returned. Default is null.
Optional
source: booleanOptional boolean that specifies if the connection is incoming or outgoing. Default is null.
Returns an Rectangle that defines the bounds of the given cell or the bounding box if useBoundingBox is true.
Returns a boolean indicating if the given Cell should be ignored by the algorithm. This implementation returns false for all vertices.
Returns horizontal.
Returns a boolean indicating if the given mxCell should be ignored as a vertex. This returns true if the cell has no connections.
mxCell whose ignored state should be returned.
Returns a boolean indicating if the given Cell is movable or bendable by the algorithm. This implementation returns true if the given cell is movable in the graph.
Disables or enables the edge style of the given edge.
Disables or enables orthogonal end segments of the given edge.
Sets the new position of the given cell taking into account the size of the bounding box if useBoundingBox is true. The change is only carried out if the new location is not equal to the existing location, otherwise the geometry is not replaced with an updated instance. The new or old bounds are returned (including overlapping labels).
Called if sortEdges is true to sort the array of outgoing edges in place.
Traverses the (directed) graph invoking the given function for each visited vertex and edge. The function is invoked with the current vertex and the incoming edge as a parameter. This implementation makes sure each vertex is only visited once. The function may return false if the traversal should stop at the given vertex.
Example:
GlobalConfig.logger.show();
const cell = graph.getSelectionCell();
graph.traverse(cell, false, function(vertex, edge)
{
GlobalConfig.logger.debug(graph.getLabel(vertex));
});
Extends GraphLayout to implement a compact tree (Moen) algorithm. This layout is suitable for graphs that have no cycles (trees). Vertices that are not connected to the tree will be ignored by this layout.
Example