Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new mxStackLayout(graph: mxGraph, horizontal?: boolean, spacing?: number, x0?: number, y0?: number, border?: number): mxStackLayout

Properties

allowGaps

allowGaps: boolean

If gaps should be allowed in the stack.

border

border: number

Border to be added if fill is true.

borderCollapse

borderCollapse: boolean

If the strokeWidth should be ignored.

fill

fill: boolean

Boolean indicating if dimension should be changed to fill out the parent cell.

graph

graph: mxGraph

Reference to the enclosing mxGraph.

gridSize

gridSize: number

Grid size for alignment of position and size.

horizontal

horizontal: boolean

Specifies the orientation of the layout.

keepFirstLocation

keepFirstLocation: boolean

Boolean indicating if the location of the first cell should be kept, that is, it will not be moved to x0 or y0.

marginBottom

marginBottom: number

Top margin for the child area.

marginLeft

marginLeft: number

Top margin for the child area.

marginRight

marginRight: number

Top margin for the child area.

marginTop

marginTop: number

Top margin for the child area.

parent

parent: mxCell

The parent cell of the layout, if any

resizeLast

resizeLast: boolean

If the last element should be resized to fill out the parent.

resizeParent

resizeParent: boolean

If the parent should be resized to match the width/height of the stack.

resizeParentMax

resizeParentMax: boolean

Use maximum of existing value and new value for resize of parent.

spacing

spacing: number

Specifies the spacing between the cells.

useBoundingBox

useBoundingBox: boolean

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

wrap

wrap: boolean

Value at which a new column or row should be created.

x0

x0: number

Specifies the horizontal origin of the layout.

y0

y0: number

Specifies the vertical origin of the layout.

Methods

arrangeGroups

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

execute

  • execute(parent: mxCell): void

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

getGraph

getLayoutCells

getParentOffset

getParentSize

  • getParentSize(): void
  • Returns the size for the parent container or the size of the graph container if the parent is a layer or the root of the model.

    Returns void

getVertexBounds

isAncestor

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

isEdgeIgnored

  • isEdgeIgnored(edge: mxCell): boolean

isHorizontal

  • isHorizontal(): boolean

isVertexIgnored

  • isVertexIgnored(vertex: mxCell): boolean

isVertexMovable

  • isVertexMovable(cell: mxCell): boolean

moveCell

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

snap

  • snap(): void

traverse

  • 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:

    (code) mxLog.show(); var cell = graph.getSelectionCell(); graph.traverse(cell, false, function(vertex, edge) { mxLog.debug(graph.getLabel(vertex)); }); (end)

    Parameters

    • vertex: mxCell

      mxCell that represents the vertex where the traversal starts.

    • Optional directed: boolean

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

    • Optional func: Function

      Visitor function that takes the current vertex and the incoming edge as arguments. The traversal stops if the function returns false.

    • Optional edge: mxCell

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

    • Optional visited: mxDictionary<any>

      Optional mxDictionary of cell paths for the visited cells.

    Returns void

Generated using TypeDoc