Constructs a new radial tree layout for the specified graph
The initial offset to compute the angle position.
Specifies if the radios should be computed automatically
Reference to the enclosing mxGraph.
Holds the levelDistance.
Holds the nodeDistance.
The parent cell of the layout, if any
The X co-ordinate of the root cell
The Y co-ordinate of the root cell
Array of vertices on each row
Variable: rowMaxCenX
Array of x coordinate of rightmost vertex of each row
Array of rightmost x coordinate of each row
Array of x coordinate of leftmost vertex of each row
Array of leftmost x coordinate of each row
Array of y deltas of each row behind root vertex, also the radius in 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 its available. Default is true.
Shortcut to mxGraph.updateGroupBounds with moveGroup set to true.
Recursive function to calculate the dimensions of each row
Array of internal nodes, the children of which are to be processed.
Integer indicating which row is being processed.
Function: execute
Implements <mxGraphLayout.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.
Parameters:
mxCell whose children should be laid out.
Optional mxCell that will be used as the root of the tree.
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.
mxCell whose constraint should be returned.
Optional mxCell that represents the connection whose constraint should be returned. Default is null.
Optional boolean that specifies if the connection is incoming or outgoing. Default is null.
Returns the graph that this layout operates on.
Returns an mxRectangle that defines the bounds of the given cell or the bounding box if useBoundingBox is true.
Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. index) so that the outcome of the layout will position the vertex as close to the point (x, y) as possible.
Empty implementation.
mxCell which has been moved.
X-coordinate of the new cell location.
Y-coordinate of the new cell location.
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).
mxCell whose geometry is to be set.
Integer that defines the x-coordinate of the new location.
Integer that defines the y-coordinate of the new location.
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:
(code) mxLog.show(); var cell = graph.getSelectionCell(); graph.traverse(cell, false, function(vertex, edge) { mxLog.debug(graph.getLabel(vertex)); }); (end)
mxCell that represents the vertex where the traversal starts.
Optional boolean indicating if edges should only be traversed from source to target. Default is true.
Visitor function that takes the current vertex and the incoming edge as arguments. The traversal stops if the function returns false.
Optional mxCell that represents the incoming edge. This is null for the first step of the traversal.
Optional mxDictionary of cell paths for the visited cells.
Generated using TypeDoc
Extends mxGraphLayout to implement a radial tree 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.