Options
All
  • Public
  • Public/Protected
  • All
Menu

A hierarchical layout algorithm.

Hierarchy

Index

Constructors

constructor

Properties

disableEdgeStyle

disableEdgeStyle: boolean

Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result

default

true

dummyVertexWidth

dummyVertexWidth: number

The cell width of any dummy vertices inserted

default

50

edgeSourceTermCache

edgeSourceTermCache: mxDictionary<mxCell>

A cache of edges whose source terminal is the key

edgeStyle

edgeStyle: string

The style to apply between cell layers to edge segments.

default

{@link mxHierarchicalEdgeStyle.POLYLINE}

edgesCache

edgesCache: mxDictionary<mxCell>

A cache of edges whose source terminal is the key

edgesTargetTermCache

edgesTargetTermCache: mxDictionary<mxCell>

A cache of edges whose source terminal is the key

fineTuning

fineTuning: boolean

Whether or not to perform local optimisations and iterate multiple times through the algorithm.

default

true

graph

graph: mxGraph

Reference to the enclosing mxGraph.

interHierarchySpacing

interHierarchySpacing: number

The spacing buffer between unconnected hierarchies.

default

60

interRankCellSpacing

interRankCellSpacing: number

The spacing buffer added between cell on adjacent layers.

default

100

intraCellSpacing

intraCellSpacing: number

The spacing buffer added between cells on the same layer.

default

30

maintainParentLocation

maintainParentLocation: boolean

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

false for backwards compatibility.

model

The internal mxSwimlaneModel formed of the layout.

default

null

moveParent

moveParent: boolean

Specifies if the parent should be moved if resizeParent is enabled.

default

false

orientation

orientation: string

The position of the root node(s) relative to the laid out graph in.

default

mxConstants.DIRECTION_NORTH

parallelEdgeSpacing

parallelEdgeSpacing: number

The distance between each parallel edge on each ranks for long edges.

default

10.

parent

parent: mxCell

The parent cell of the layout, if any

parentBorder

parentBorder: number

The border to be added around the children if the parent is to be resized using resizeParent.

default

30

resizeParent

resizeParent: boolean

Specifies if the parent should be resized after the layout so that it contains all the child cells. Default is false. See also .

default

false

roots

roots: mxCell[]

Holds the array of mxCell that this layout contains.

swimlanes

swimlanes: mxCell[]

Holds the array of mxCell of the ordered swimlanes to lay out

tightenToSource

tightenToSource: boolean

Variable: tightenToSource

Whether or not to tighten the assigned ranks of vertices up towards the source cells.

traverseAncestors

traverseAncestors: boolean

Whether or not to drill into child cells and layout in reverse group order. This also cause the layout to navigate edges whose terminal vertices have different parents but are in the same ancestry chain.

default

true

useBoundingBox

useBoundingBox: boolean

Boolean indicating if the bounding box of the label should be used if its available. Default is true.

Methods

arrangeGroups

  • arrangeGroups(cells: mxCell[], border?: number, topBorder?: number, rightBorder?: number, bottomBorder?: number, leftBorder?: number): mxCell[]

crossingStage

  • crossingStage(parent: mxCell): void

cycleStage

  • cycleStage(parent: mxCell): void

execute

filterDescendants

findRoots

  • Returns all visible children in the given parent which do not have incoming edges. If the result is empty then the children with the maximum difference between incoming and outgoing edges are returned. This takes into account edges that are being promoted to the given root due to invisible children or collapsed cells.

    Parameters

    • parent: mxCell

      mxCell whose children should be checked.

    • vertices: mxCell[]

      array of vertices to limit search to

    Returns mxCell[]

getConstraint

  • getConstraint(key: string, cell: mxCell, edge?: mxCell, source?: boolean): any
  • 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.

    Parameters

    • key: string

      Key of the constraint to be returned.

    • cell: mxCell

      mxCell whose constraint should be returned.

    • Optional edge: mxCell

      Optional mxCell that represents the connection whose constraint should be returned. Default is null.

    • Optional source: boolean

      Optional boolean that specifies if the connection is incoming or outgoing. Default is null.

    Returns any

getEdges

getEdgesBetween

getGraph

getModel

getParentOffset

getVertexBounds

getVisibleTerminal

  • Function: getVisibleTerminal

    Helper function to return visible terminal for edge allowing for ports

    Parameters:

    Parameters

    • edge: mxCell

      mxCell whose edges should be returned.

    • source: boolean

      boolean that specifies whether the source or target terminal is to be returned

    Returns mxCell

isAncestor

  • isAncestor(parent: mxCell, child: mxCell, traverseAncestors?: boolean): boolean

isEdgeIgnored

  • isEdgeIgnored(edge: mxCell): boolean

isPort

  • isPort(cell: mxCell): boolean

isVertexIgnored

  • isVertexIgnored(vertex: mxCell): boolean

isVertexMovable

  • isVertexMovable(cell: mxCell): boolean

layeringStage

  • layeringStage(): void

moveCell

  • moveCell(cell: mxCell, x: number, y: number): void
  • 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.

    Parameters

    • cell: mxCell

      mxCell which has been moved.

    • x: number

      X-coordinate of the new cell location.

    • y: number

      Y-coordinate of the new cell location.

    Returns void

placementStage

  • placementStage(initialX: number, parent: mxCell): number

run

  • The API method used to exercise the layout upon the graph description and produce a separate description of the vertex position and edge routing changes made. It runs each stage of the layout that has been created.

    Parameters

    Returns void

setEdgePoints

setEdgeStyleEnabled

  • setEdgeStyleEnabled(edge: mxCell, value: any): void

setOrthogonalEdge

  • setOrthogonalEdge(edge: mxCell, value: any): void

setVertexLocation

  • 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).

    Parameters

    • cell: mxCell

      mxCell whose geometry is to be set.

    • x: number

      Integer that defines the x-coordinate of the new location.

    • y: number

      Integer that defines the y-coordinate of the new location.

    Returns mxRectangle

traverse

  • traverse(vertex: mxCell, directed?: boolean, func?: Function, edge?: mxCell, visited?: mxDictionary<any>): void
  • traverse(vertex: mxCell, directed?: boolean, edge?: mxCell, allVertices?: mxCell[], currentComp?: mxCell[], hierarchyVertices?: mxCell[], filledVertexSet?: mxCell[], swimlaneIndex?: number): void
  • 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.

    Parameters

    • vertex: mxCell

      mxCell that represents the vertex where the traversal starts.

    • Optional directed: boolean

      boolean indicating if edges should only be traversed from source to target. Default is true.

    • Optional func: Function
    • Optional edge: mxCell

      Optional mxCell that represents the incoming edge. This is null for the first step of the traversal.

    • Optional visited: mxDictionary<any>

    Returns void

  • Parameters

    • vertex: mxCell
    • Optional directed: boolean
    • Optional edge: mxCell
    • Optional allVertices: mxCell[]
    • Optional currentComp: mxCell[]
    • Optional hierarchyVertices: mxCell[]
    • Optional filledVertexSet: mxCell[]
    • Optional swimlaneIndex: number

    Returns void

updateGroupBounds

  • updateGroupBounds(): void

Generated using TypeDoc