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.
var layout = new mxStackLayout(graph, true); layout.execute(graph.getDefaultParent());
mxStackLayout | Extends mxGraphLayout to create a horizontal or vertical stack of the child vertices. |
Functions | |
mxStackLayout | Constructs a new stack layout layout for the specified graph, spacing, orientation and offset. |
Variables | |
horizontal | Specifies the orientation of the layout. |
spacing | Specifies the spacing between the cells. |
x0 | Specifies the horizontal origin of the layout. |
y0 | Specifies the vertical origin of the layout. |
border | Border to be added if fill is true. |
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 | Boolean indicating if dimension should be changed to fill out the parent cell. |
resizeParent | If the parent should be resized to match the width/height of the stack. |
resizeLast | If the last element should be resized to fill out the parent. |
wrap | Value at which a new column or row should be created. |
Functions | |
isHorizontal | Returns horizontal. |
moveCell | Implements mxGraphLayout.moveCell. |
getParentSize | 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 | Implements mxGraphLayout.execute. |
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.
mxStackLayout.prototype.isHorizontal = function()
Returns horizontal.
mxStackLayout.prototype.moveCell = function( cell, x, y )
Implements mxGraphLayout.moveCell.
mxStackLayout.prototype.execute = function( parent )
Implements mxGraphLayout.execute.
Only children where <isVertexIgnored> returns false are taken into account.
Constructs a new stack layout layout for the specified graph, spacing, orientation and offset.
function mxStackLayout( graph, horizontal, spacing, x0, y0, border )
Specifies the orientation of the layout.
mxStackLayout.prototype.horizontal
Specifies the spacing between the cells.
mxStackLayout.prototype.spacing
Specifies the horizontal origin of the layout.
mxStackLayout.prototype.x0
Specifies the vertical origin of the layout.
mxStackLayout.prototype.y0
Border to be added if fill is true.
mxStackLayout.prototype.border
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.keepFirstLocation
Boolean indicating if dimension should be changed to fill out the parent cell.
mxStackLayout.prototype.fill
If the parent should be resized to match the width/height of the stack.
mxStackLayout.prototype.resizeParent
If the last element should be resized to fill out the parent.
mxStackLayout.prototype.resizeLast
Value at which a new column or row should be created.
mxStackLayout.prototype.wrap
Returns horizontal.
mxStackLayout.prototype.isHorizontal = function()
Implements mxGraphLayout.moveCell.
mxStackLayout.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.
mxGraphLayout.prototype.moveCell = function( cell, x, y )
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.getParentSize = function( parent )
Implements mxGraphLayout.execute.
mxStackLayout.prototype.execute = function( parent )
Executes the layout algorithm for the children of the given parent.
mxGraphLayout.prototype.execute = function( parent )