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. |
marginTop | Top margin for the child area. |
marginLeft | Top margin for the child area. |
marginRight | Top margin for the child area. |
marginBottom | Top margin for the child area. |
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. |
resizeParentMax | Use maximum of existing value and new value for resize of parent. |
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. |
borderCollapse | If the strokeWidth should be ignored. |
allowGaps | If gaps should be allowed in the stack. |
gridSize | Grid size for alignment of position and size. |
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. |
getLayoutCells | Returns the cells to be layouted. |
snap | Snaps the given value to the grid size. |
execute | Implements mxGraphLayout.execute. |
execute | Implements mxGraphLayout.execute. |
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.
Implements mxGraphLayout.execute.
Only children where <isVertexIgnored> returns false are taken into account.
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
Top margin for the child area.
mxStackLayout.prototype.marginTop
Top margin for the child area.
mxStackLayout.prototype.marginLeft
Top margin for the child area.
mxStackLayout.prototype.marginRight
Top margin for the child area.
mxStackLayout.prototype.marginBottom
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
Use maximum of existing value and new value for resize of parent.
mxStackLayout.prototype.resizeParentMax
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
If the strokeWidth should be ignored.
mxStackLayout.prototype.borderCollapse
If gaps should be allowed in the stack.
mxStackLayout.prototype.allowGaps
Grid size for alignment of position and size.
mxStackLayout.prototype.gridSize
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 )
Returns the cells to be layouted.
mxStackLayout.prototype.getLayoutCells = function( parent )
Snaps the given value to the grid size.
mxStackLayout.prototype.snap = function( value )
Implements mxGraphLayout.execute.
mxStackLayout.prototype.execute = function( parent )
Executes the layout algorithm for the children of the given parent.
mxGraphLayout.prototype.execute = function( parent )