Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CoordinateAssignment

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

Constructor: mxCoordinateAssignment

Creates a coordinate assignment.

Arguments:

intraCellSpacing - the minimum buffer between cells on the same rank interRankCellSpacing - the minimum distance between cells on adjacent ranks orientation - the position of the root node(s) relative to the graph initialX - the leftmost coordinate node placement starts at

Hierarchy

Index

Constructors

constructor

Properties

channelBuffer

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

currentXDelta: null | number = null

The sum of x-displacements for the current iteration

fineTuning

fineTuning: boolean = true

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

groupPadding

groupPadding: number = 10

Padding added to resized parents Default is 10.

initialX

initialX: number

The minimum x position node placement starts at

interRankCellSpacing

interRankCellSpacing: number = 100

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

intraCellSpacing

intraCellSpacing: number = 30

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

jettyPositions

jettyPositions: null | {} = 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

layout

Reference to the enclosing .

limitX

limitX: null | number = null

The maximum x value this positioning lays up to

maxIterations

maxIterations: number = 8

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

minEdgeJetty

minEdgeJetty: number = 12

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

nextLayerConnectedCache

nextLayerConnectedCache: null = null

A store of connections to the layer above for speed

orientation

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

parallelEdgeSpacing: number = 10

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

prefHozEdgeSep

prefHozEdgeSep: number = 5

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

prefVertEdgeOff

prefVertEdgeOff: number = 2

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

previousLayerConnectedCache

previousLayerConnectedCache: null = null

A store of connections to the layer below for speed

rankBottomY

rankBottomY: null | number[] = null

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

rankTopY

rankTopY: null | number[] = null

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

rankWidths

rankWidths: null | number[] = null

The width of all the ranks

rankY

rankY: null | number[] = null

The Y-coordinate of all the ranks

widestRank

widestRank: null | number = null

The rank that has the widest x position

widestRankValue

widestRankValue: null | number = null

The X-coordinate of the edge of the widest rank

Methods

calculateWidestRank

calculatedWeightedValue

execute

  • execute(parent: any): void

initialCoords

  • 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

localEdgeProcessing

medianPos

medianXValue

minNode

minPath

printStatus

  • printStatus(): void

processReversedEdge

rankCoordinates

  • 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

rankMedianPosition

repositionValid

setCellLocations

setEdgePosition

setVertexLocation

Generated using TypeDoc