Options
All
  • Public
  • Public/Protected
  • All
Menu

Extends for partitioning the parent cell vertically or horizontally by filling the complete area with the child cells. A horizontal layout partitions the height of the given parent whereas a a non-horizontal layout partitions the width. If the parent is a layer (that is, a child of the root node), then the current graph size is partitioned. The children do not need to be connected for this layout to work.

Example:

example
var layout = new mxPartitionLayout(graph, true, 10, 20);
layout.execute(graph.getDefaultParent());

Hierarchy

Index

Constructors

constructor

Properties

border

border: number

Integer that specifies the absolute inset in pixels for the parent that contains the children. Default is 0.

graph

graph: mxGraph

Reference to the enclosing mxGraph.

horizontal

horizontal: boolean

Boolean indicating the direction in which the space is partitioned. Default is true.

parent

parent: mxCell

The parent cell of the layout, if any

resizeVertices

resizeVertices: boolean

Boolean that specifies if vertices should be resized. Default is true.

spacing

spacing: number

Integer that specifies the absolute spacing in pixels between the children. Default is 0.

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[]

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

getParentOffset

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

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