mxStackLayout

Extends mxGraphLayout to create a horizontal or vertical stack of the child vertices.  The children do not need to be connected for this layout to work.

Example

var layout = new mxStackLayout(graph, true);
layout.execute(graph.getDefaultParent());
Summary
mxStackLayoutExtends mxGraphLayout to create a horizontal or vertical stack of the child vertices.
Functions
mxStackLayoutConstructs a new stack layout layout for the specified graph, spacing, orientation and offset.
Variables
horizontalSpecifies the orientation of the layout.
spacingSpecifies the spacing between the cells.
x0Specifies the horizontal origin of the layout.
y0Specifies the vertical origin of the layout.
borderBorder to be added if fill is true.
keepFirstLocationBoolean indicating if the location of the first cell should be kept, that is, it will not be moved to x0 or y0.
fillBoolean indicating if dimension should be changed to fill out the parent cell.
resizeParentIf the parent should be resized to match the width/height of the stack.
resizeLastIf the last element should be resized to fill out the parent.
wrapValue at which a new column or row should be created.
Functions
isHorizontalReturns horizontal.
moveCellImplements mxGraphLayout.moveCell.
getParentSizeReturns 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.
executeImplements mxGraphLayout.execute.

Functions

mxStackLayout

function mxStackLayout(graph,
horizontal,
spacing,
x0,
y0,
border)

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

Variables

horizontal

mxStackLayout.prototype.horizontal

Specifies the orientation of the layout.  Default is true.

spacing

mxStackLayout.prototype.spacing

Specifies the spacing between the cells.  Default is 0.

x0

mxStackLayout.prototype.x0

Specifies the horizontal origin of the layout.  Default is 0.

y0

mxStackLayout.prototype.y0

Specifies the vertical origin of the layout.  Default is 0.

border

mxStackLayout.prototype.border

Border to be added if fill is true.  Default is 0.

keepFirstLocation

mxStackLayout.prototype.keepFirstLocation

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

fill

mxStackLayout.prototype.fill

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

resizeParent

mxStackLayout.prototype.resizeParent

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

resizeLast

mxStackLayout.prototype.resizeLast

If the last element should be resized to fill out the parent.  Default is false.  If resizeParent is true then this is ignored.

wrap

mxStackLayout.prototype.wrap

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

Functions

isHorizontal

mxStackLayout.prototype.isHorizontal = function()

Returns horizontal.

moveCell

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

Implements mxGraphLayout.moveCell.

getParentSize

mxStackLayout.prototype.getParentSize = function(parent)

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.

execute

mxStackLayout.prototype.execute = function(parent)

Implements mxGraphLayout.execute.

Only children where <isVertexIgnored> returns false are taken into account.

Base class for all layout algorithms in mxGraph.
function mxStackLayout(graph,
horizontal,
spacing,
x0,
y0,
border)
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
mxStackLayout.prototype.horizontal
Specifies the orientation of the layout.
mxStackLayout.prototype.spacing
Specifies the spacing between the cells.
mxStackLayout.prototype.x0
Specifies the horizontal origin of the layout.
mxStackLayout.prototype.y0
Specifies the vertical origin of the layout.
mxStackLayout.prototype.border
Border to be added if fill is true.
mxStackLayout.prototype.keepFirstLocation
Boolean indicating if the location of the first cell should be kept, that is, it will not be moved to x0 or y0.
mxStackLayout.prototype.fill
Boolean indicating if dimension should be changed to fill out the parent cell.
mxStackLayout.prototype.resizeParent
If the parent should be resized to match the width/height of the stack.
mxStackLayout.prototype.resizeLast
If the last element should be resized to fill out the parent.
mxStackLayout.prototype.wrap
Value at which a new column or row should be created.
mxStackLayout.prototype.isHorizontal = function()
Returns horizontal.
mxStackLayout.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.
mxStackLayout.prototype.getParentSize = function(parent)
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.
mxStackLayout.prototype.execute = function(parent)
Implements mxGraphLayout.execute.
mxGraphLayout.prototype.execute = function(parent)
Executes the layout algorithm for the children of the given parent.
Close