Implements a layout manager that updates the layout for a given transaction.
var layoutMgr = new mxLayoutManager(graph); layoutMgr.getLayout = function(cell) { return layout; };
mxLayoutManager | Implements a layout manager that updates the layout for a given transaction. |
Events | |
mxEvent. | Fires between begin- and endUpdate after all cells have been layouted in layoutCells. |
Functions | |
mxLayoutManager | Constructs a new automatic layout for the given graph. |
Variables | |
graph | Reference to the enclosing mxGraph. |
bubbling | Specifies if the layout should bubble along the cell hierarchy. |
enabled | Specifies if event handling is enabled. |
updateHandler | Holds the function that handles the endUpdate event. |
moveHandler | Holds the function that handles the move event. |
Functions | |
isEnabled | Returns true if events are handled. |
setEnabled | Enables or disables event handling. |
isBubbling | Returns true if a layout should bubble, that is, if the parent layout should be executed whenever a cell layout (layout of the children of a cell) has been executed. |
setBubbling | Sets bubbling. |
getGraph | Returns the graph that this layout operates on. |
setGraph | Sets the graph that the layouts operate on. |
getLayout | Returns the layout to be executed for the given graph and parent. |
beforeUndo | Called from the undoHandler. |
cellsMoved | Called from the moveHandler. |
getCellsForEdit | Returns the cells to be layouted for the given sequence of changes. |
getCellsForChange | Executes all layouts which have been scheduled during the changes. |
layoutCells | Executes all layouts which have been scheduled during the changes. |
executeLayout | Executes the given layout on the given parent. |
destroy | Removes all handlers from the graph and deletes the reference to it. |
Fires between begin- and endUpdate after all cells have been layouted in layoutCells. The <code>cells</code> property contains all cells that have been passed to layoutCells.
mxLayoutManager.prototype.graph
Reference to the enclosing mxGraph.
mxLayoutManager.prototype.isEnabled = function()
Returns true if events are handled. This implementation returns enabled.
mxLayoutManager.prototype.setEnabled = function( enabled )
Enables or disables event handling. This implementation updates enabled.
enabled | Boolean that specifies the new enabled state. |
mxLayoutManager.prototype.isBubbling = function()
Returns true if a layout should bubble, that is, if the parent layout should be executed whenever a cell layout (layout of the children of a cell) has been executed. This implementation returns bubbling.
mxLayoutManager.prototype.setBubbling = function( value )
Sets bubbling.
mxLayoutManager.prototype.beforeUndo = function( undoableEdit )
Called from the undoHandler.
cell | Array of mxCells that have been moved. |
evt | Mouse event that represents the mousedown. |
mxLayoutManager.prototype.cellsMoved = function( cells, evt )
Called from the moveHandler.
cell | Array of mxCells that have been moved. |
evt | Mouse event that represents the mousedown. |
mxLayoutManager.prototype.destroy = function()
Removes all handlers from the graph and deletes the reference to it.
Executes all layouts which have been scheduled during the changes.
mxLayoutManager.prototype.layoutCells = function( cells )
Constructs a new automatic layout for the given graph.
function mxLayoutManager( graph )
Reference to the enclosing mxGraph.
mxLayoutManager.prototype.graph
Specifies if the layout should bubble along the cell hierarchy.
mxLayoutManager.prototype.bubbling
Specifies if event handling is enabled.
mxLayoutManager.prototype.enabled
Holds the function that handles the endUpdate event.
mxLayoutManager.prototype.updateHandler
Holds the function that handles the move event.
mxLayoutManager.prototype.moveHandler
Returns true if events are handled.
mxLayoutManager.prototype.isEnabled = function()
Enables or disables event handling.
mxLayoutManager.prototype.setEnabled = function( enabled )
Returns true if a layout should bubble, that is, if the parent layout should be executed whenever a cell layout (layout of the children of a cell) has been executed.
mxLayoutManager.prototype.isBubbling = function()
Sets bubbling.
mxLayoutManager.prototype.setBubbling = function( value )
Returns the graph that this layout operates on.
mxLayoutManager.prototype.getGraph = function()
Sets the graph that the layouts operate on.
mxLayoutManager.prototype.setGraph = function( graph )
Returns the layout to be executed for the given graph and parent.
mxLayoutManager.prototype.getLayout = function( parent )
Called from the undoHandler.
mxLayoutManager.prototype.beforeUndo = function( undoableEdit )
Called from the moveHandler.
mxLayoutManager.prototype.cellsMoved = function( cells, evt )
Executes all layouts which have been scheduled during the changes.
mxLayoutManager.prototype.getCellsForChange = function( change )
Executes the given layout on the given parent.
mxLayoutManager.prototype.executeLayout = function( layout, parent )
Removes all handlers from the graph and deletes the reference to it.
mxLayoutManager.prototype.destroy = function()