<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxLayoutManager"></a>mxLayoutManager</h1><divclass=CBody><h4class=CHeading>Implements a layout manager that runs a given layout after any changes to the graph</h4><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var layoutMgr = new mxLayoutManager(graph);
};</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxLayoutManager">mxLayoutManager</a></td><tdclass=SDescription></td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLayoutManager.Events">Events</a></td><tdclass=SDescription></td></tr><trclass="SEvent SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.mxEvent.LAYOUT_CELLS">mxEvent.<wbr>LAYOUT_CELLS</a></td><tdclass=SDescription>Fires between begin- and endUpdate after all cells have been layouted in <ahref="#mxLayoutManager.layoutCells"class=LFunctionid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">layoutCells</a>. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLayoutManager.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.mxLayoutManager"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">mxLayoutManager</a></td><tdclass=SDescription>Constructs a new automatic layout for the given graph.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLayoutManager.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.graph"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">graph</a></td><tdclass=SDescription>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxGraph</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLayoutManager.bubbling"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">bubbling</a></td><tdclass=SDescription>Specifies if the layout should bubble along the cell hierarchy. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.enabled"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">enabled</a></td><tdclass=SDescription>Specifies if event handling is enabled. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLayoutManager.updateHandler"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">updateHandler</a></td><tdclass=SDescription>Holds the function that handles the endUpdate event.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.moveHandler"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">moveHandler</a></td><tdclass=SDescription>Holds the function that handles the move event.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLayoutManager.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.isEnabled"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">isEnabled</a></td><tdclass=SDescription>Returns true if events are handled. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLayoutManager.setEnabled"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">setEnabled</a></td><tdclass=SDescription>Enables or disables event handling. </td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLayoutManager.isBubbling"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">isBubbling</a></td><tdclass=SDescription>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. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLayoutManager.setBubbling"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">setBubbling
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.mxEvent.LAYOUT_CELLS"></a>mxEvent.<wbr>LAYOUT_CELLS</h3><divclass=CBody><p>Fires between begin- and endUpdate after all cells have been layouted in <ahref="#mxLayoutManager.layoutCells"class=LFunctionid=link24onMouseOver="ShowTip(event, 'tt1', 'link24')"onMouseOut="HideTip('tt1')">layoutCells</a>. The <code>cells</code> property contains all cells that have been passed to <ahref="#mxLayoutManager.layoutCells"class=LFunctionid=link25onMouseOver="ShowTip(event, 'tt1', 'link25')"onMouseOut="HideTip('tt1')">layoutCells</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.mxLayoutManager"></a>mxLayoutManager</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxLayoutManager(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new automatic layout for the given graph.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription>Reference to the enclosing graph.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link26onMouseOver="ShowTip(event, 'tt4', 'link26')"onMouseOut="HideTip('tt4')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.bubbling"></a>bubbling</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.bubbling</td></tr></table></blockquote><p>Specifies if the layout should bubble along the cell hierarchy. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.enabled"></a>enabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.enabled</td></tr></table></blockquote><p>Specifies if event handling is enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.updateHandler"></a>updateHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.updateHandler</td></tr></table></blockquote><p>Holds the function that handles the endUpdate event.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.moveHandler"></a>moveHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.moveHandler</td></tr></table></blockquote><p>Holds the function that handles the move event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.isEnabled"></a>isEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.isEnabled = function()</td></tr></table></blockquote><p>Returns true if events are handled. This implementation returns <ahref="#mxLayoutManager.enabled"class=LVariableid=link27onMouseOver="ShowTip(event, 'tt6', 'link27')"onMouseOut="HideTip('tt6')">enabled</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.setEnabled"></a>setEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.setEnabled = function(</td><tdclass=PParameternowrap>enabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Enables or disables event handling. This implementation updates <ahref="#mxLayoutManager.enabled"class=LVariableid=link28onMouseOver="ShowTip(event, 'tt6', 'link28')"onMouseOut="HideTip('tt6')">enabled</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>enabled</td><tdclass=CDLDescription>Boolean that specifies the new enabled state.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.isBubbling"></a>isBubbling</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.isBubbling = function()</td></tr></table></blockquote><p>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 <ahref="#mxLayoutManager.bubbling"class=LVariableid=link29onMouseOver="ShowTip(event, 'tt5', 'link29')"onMouseOut="HideTip('tt5')">bubbling</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.getGraph"></a>getGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.getGraph = function()</td></tr></table></blockquote><p>Returns the graph that this layout operates on.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.setGraph"></a>setGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.setGraph = function(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the graph that the layouts operate on.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.getLayout"></a>getLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.getLayout = function(</td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the layout to be executed for the given graph and parent.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.beforeUndo"></a>beforeUndo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.beforeUndo = function(</td><tdclass=PParameternowrap>undoableEdit</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Called from the undoHandler.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link31onMouseOver="ShowTip(event, 'tt21', 'link31')"onMouseOut="HideTip('tt21')">mxCells</a> that have been moved.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Mouse event that represents the mousedown.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.cellsMoved"></a>cellsMoved</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.cellsMoved = function(</td><tdclass=PParameternowrap>cells,</td></tr><tr><td></td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Called from the moveHandler.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link32onMouseOver="ShowTip(event, 'tt21', 'link32')"onMouseOut="HideTip('tt21')">mxCells</a> that have been moved.</td></tr><tr><tdclass=CDLEntry>evt</td><tdclass=CDLDescription>Mouse event that represents the mousedown.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.getCellsForEdit"></a>getCellsForEdit</h3><divclass=CBody><p>Returns the cells to be layouted for the given sequence of changes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.getCellsForChange"></a>getCellsForChange</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.getCellsForChange = function(</td><tdclass=PParameternowrap>change</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes all layouts which have been scheduled during the changes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.layoutCells"></a>layoutCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.layoutCells = function(</td><tdclass=PParameternowrap>cells</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes all layouts which have been scheduled during the changes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.executeLayout"></a>executeLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.executeLayout = function(</td><tdclass=PParameternowrap>layout,</td></tr><tr><td></td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes the given layout on the given parent.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLayoutManager.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.destroy = function()</td></tr></table></blockquote><p>Removes all handlers from the <ahref="#mxLayoutManager.graph"class=LVariableid=link33onMouseOver="ShowTip(event, 'tt3', 'link33')"onMouseOut="HideTip('tt3')">graph</a> and deletes the reference to it.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.layoutCells = function(</td><tdclass=PParameternowrap>cells</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Executes all layouts which have been scheduled during the changes.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxLayoutManager(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new automatic layout for the given graph.</div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph.</div></div><divclass=CToolTipid="tt4"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.bubbling</td></tr></table></blockquote>Specifies if the layout should bubble along the cell hierarchy. </div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.enabled</td></tr></table></blockquote>Specifies if event handling is enabled. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.updateHandler</td></tr></table></blockquote>Holds the function that handles the endUpdate event.</div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.moveHandler</td></tr></table></blockquote>Holds the function that handles the move event.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.isEnabled = function()</td></tr></table></blockquote>Returns true if events are handled. </div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.setEnabled = function(</td><tdclass=PParameternowrap>enabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Enables or disables event handling. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxLayoutManager.prototype.isBubbling = function()</td></tr></table></blockquote>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. </div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxLayoutManager.prototype.setBubbling = function(</td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets bubbling.</div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"