mxPartitionLayout

Extends mxGraphLayout 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

var layout = new mxPartitionLayout(graph, true, 10, 20);
layout.execute(graph.getDefaultParent());
Summary
mxPartitionLayoutExtends mxGraphLayout for partitioning the parent cell vertically or horizontally by filling the complete area with the child cells.
Functions
mxPartitionLayoutConstructs a new stack layout layout for the specified graph, spacing, orientation and offset.
Variables
horizontalBoolean indicating the direction in which the space is partitioned.
spacingInteger that specifies the absolute spacing in pixels between the children.
borderInteger that specifies the absolute inset in pixels for the parent that contains the children.
resizeVerticesBoolean that specifies if vertices should be resized.
Functions
isHorizontalReturns horizontal.
moveCellImplements mxGraphLayout.moveCell.
executeImplements mxGraphLayout.execute.

Functions

mxPartitionLayout

function mxPartitionLayout(graph,
horizontal,
spacing,
border)

Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.

Variables

horizontal

mxPartitionLayout.prototype.horizontal

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

spacing

mxPartitionLayout.prototype.spacing

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

border

mxPartitionLayout.prototype.border

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

resizeVertices

mxPartitionLayout.prototype.resizeVertices

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

Functions

isHorizontal

mxPartitionLayout.prototype.isHorizontal = function()

Returns horizontal.

moveCell

mxPartitionLayout.prototype.moveCell = function(cell,
x,
y)

Implements mxGraphLayout.moveCell.

execute

mxPartitionLayout.prototype.execute = function(parent)

Implements mxGraphLayout.execute.  All children where <isVertexIgnored> returns false and <isVertexMovable> returns true are modified.

Base class for all layout algorithms in mxGraph.
function mxPartitionLayout(graph,
horizontal,
spacing,
border)
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
mxPartitionLayout.prototype.horizontal
Boolean indicating the direction in which the space is partitioned.
mxPartitionLayout.prototype.spacing
Integer that specifies the absolute spacing in pixels between the children.
mxPartitionLayout.prototype.border
Integer that specifies the absolute inset in pixels for the parent that contains the children.
mxPartitionLayout.prototype.resizeVertices
Boolean that specifies if vertices should be resized.
mxPartitionLayout.prototype.isHorizontal = function()
Returns horizontal.
mxPartitionLayout.prototype.moveCell = function(cell,
x,
y)
Implements mxGraphLayout.moveCell.
mxGraphLayout.prototype.moveCell = function(cell,
x,
y)
Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg.
mxPartitionLayout.prototype.execute = function(parent)
Implements mxGraphLayout.execute.
mxGraphLayout.prototype.execute = function(parent)
Executes the layout algorithm for the children of the given parent.
Close