Boolean flag that specifies if the layout is allowed to run. If this is set to false, then the layout exits in the following iteration.
An array of locally stored co-ordinate positions for the vertices.
Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result. Default is true.
An array of locally stored X co-ordinate displacements for the vertices.
An array of locally stored Y co-ordinate displacements for the vertices.
The force constant by which the attractive forces are divided and the replusive forces are multiple by the square of. The value equates to the average radius there is of free space around each node. Default is 50.
Cache of
Reference to the enclosing Graph.
Hashtable from cells to local indices.
Start value of temperature. Default is 200.
Array of booleans representing the movable states of the vertices.
Current iteration count.
Maximal distance limit. Default is 500. Prevents of dividing by zero.
Total number of iterations to run the layout though.
Minimal distance limit. Default is 2. Prevents of dividing by zero.
Cached version of minDistanceLimit squared.
Local copy of cell neighbours.
The parent cell of the layout, if any
The approximate radius of each cell, nodes only.
The approximate radius squared of each cell, nodes only.
Specifies if all edge points of traversed edges should be removed. Default is true.
Temperature to limit displacement at later stages of layout.
Boolean indicating if the bounding box of the label should be used if it iss available.
Specifies if the top left corner of the input cells should be the origin of the layout result. Default is true.
An array of all vertices to be laid out.
Shortcut to Graph#updateGroupBounds with moveGroup set to true.
Implements GraphLayout#execute. This operates on all children of the
given parent where
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 a boolean indicating if the given
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).
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 fast organic layout algorithm. The vertices need to be connected for this layout to work, vertices with no connections are ignored.
Example: