doLayout method

void doLayout(
  1. Object coll
)

Perform the tree layout.

If there is no Layout#network, this calls #makeNetwork to create a LayoutNetwork from the given collection of Parts.

If there are no TreeVertex #roots specified, this finds all roots in the Layout#network.

This initializes all of the TreeVertexes and TreeEdges, calling #initializeTreeVertexValues on each vertex, supporting inheritance of vertex values. Then it calls #assignTreeVertexValues on each one, to allow for node/vertex-specific customizations. Next it sorts all of the child vertexes for each parent vertex, if needed.

This also calls #addComments of each vertex, in order to find any comment nodes associated with each vertex, so that they can be accommodated by the layout.

This then actually does the "layout" of the vertexes and optionally the routing of the edges of each tree in the network. To deal with multiple roots/trees this also calls #arrangeTrees to position each separate tree relative to each other.

Finally this calls Layout#updateParts to commit the Node positions from the vertex positions and the Link routes from the edges. Layout#updateParts calls #commitLayout within a transaction. @param {Diagram|Group|Iterable.

Implementation

void doLayout(_i2.Object coll) {
  _i4.callMethod(
    this,
    'doLayout',
    [coll],
  );
}