Class CoordinateAssignment

Sets the horizontal locations of node and edge dummy nodes on each layer. Uses median down and up weightings as well as heuristics to straighten edges as far as possible.

Hierarchy (view full)

Constructors

Properties

channelBuffer: number = 4

The size of the vertical buffer in the center of inter-rank channels where edge control points should not be placed Default is 4.

currentXDelta: null | number = null

The sum of x-displacements for the current iteration

fineTuning: boolean = true

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

groupPadding: number = 10

Padding added to resized parents Default is 10.

initialX: number

The minimum x position node placement starts at

interRankCellSpacing: number = 100

The minimum distance between cells on adjacent ranks. Default is 100.

intraCellSpacing: number = 30

The minimum buffer between cells on the same rank. Default is 30.

jettyPositions: null | {
    [key: string]: number[];
} = null

Map of internal edges and (x,y) pair of positions of the start and end jetty for that edge where it connects to the source and target vertices. Note this should technically be a WeakHashMap, but since JS does not have an equivalent, housekeeping must be performed before using. i.e. check all edges are still in the model and clear the values. Note that the y co-ord is the offset of the jetty, not the absolute point

Reference to the enclosing .

limitX: null | number = null

The maximum x value this positioning lays up to

maxIterations: number = 8

The number of heuristic iterations to run. Default is 8.

minEdgeJetty: number = 12

The minimum distance for an edge jetty from a vertex Default is 12.

nextLayerConnectedCache: null = null

A store of connections to the layer above for speed

orientation: DIRECTION = DIRECTION.NORTH

The position of the root ( start ) node(s) relative to the rest of the laid out graph. Default is <mxConstants.DIRECTION.NORTH>.

parallelEdgeSpacing: number = 10

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

prefHozEdgeSep: number = 5

The preferred horizontal distance between edges exiting a vertex Default is 5.

prefVertEdgeOff: number = 2

The preferred vertical offset between edges exiting a vertex Default is 2.

previousLayerConnectedCache: null = null

A store of connections to the layer below for speed

rankBottomY: null | number[] = null

Internal cache of bottom-most value of Y for each rank

rankTopY: null | number[] = null

Internal cache of top-most values of Y for each rank

rankWidths: null | number[] = null

The width of all the ranks

rankY: null | number[] = null

The Y-coordinate of all the ranks

widestRank: null | number = null

The rank that has the widest x position

widestRankValue: null | number = null

The X-coordinate of the edge of the widest rank

Methods

  • Calculates the priority the specified cell has based on the type of its cell and the cells it is connected to on the next layer

    Parameters

    Returns number

  • Sets up the layout in an initial positioning. The ranks are all centered as much as possible along the middle vertex in each rank. The other cells are then placed as close as possible on either side.

    Parameters

    • facade: Graph

      the facade describing the input graph

    • model: GraphHierarchyModel

      an internal model of the hierarchical layout

    Returns void

  • Sets up the layout in an initial positioning. All the first cells in each rank are moved to the left and the rest of the rank inserted as close together as their size and buffering permits. This method works on just the specified rank.

    Parameters

    • rankValue: number

      the current rank being processed

    • graph: Graph

      the facade describing the input graph

    • model: GraphHierarchyModel

      an internal model of the hierarchical layout

    Returns void

  • Performs median minimisation over one rank.

    Parameters

    • rankValue: number

      the layer number of this rank

    • model: GraphHierarchyModel

      an internal model of the hierarchical layout

    • nextRankValue: number

      the layer number whose connected cels are to be laid out relative to

    Returns void