<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxGraphLayout"></a>mxGraphLayout</h1><divclass=CBody><p>Base class for all layout algorithms in mxGraph. Main public functions are <move> for handling a moved cell within a layouted parent, and <ahref="#mxGraphLayout.execute"class=LFunctionid=link36onMouseOver="ShowTip(event, 'tt7', 'link36')"onMouseOut="HideTip('tt7')">execute</a> for running the layout on a given parent cell.</p><h4class=CHeading>Known Subclasses</h4><p><ahref="mxCircleLayout-js.html#mxCircleLayout"class=LClassid=link37onMouseOver="ShowTip(event, 'tt32', 'link37')"onMouseOut="HideTip('tt32')">mxCircleLayout</a>, <ahref="mxCompactTreeLayout-js.html#mxCompactTreeLayout"class=LClassid=link38onMouseOver="ShowTip(event, 'tt33', 'link38')"onMouseOut="HideTip('tt33')">mxCompactTreeLayout</a>, <ahref="mxCompositeLayout-js.html#mxCompositeLayout"class=LClassid=link39onMouseOver="ShowTip(event, 'tt34', 'link39')"onMouseOut="HideTip('tt34')">mxCompositeLayout</a>, <ahref="mxFastOrganicLayout-js.html#mxFastOrganicLayout"class=LClassid=link40onMouseOver="ShowTip(event, 'tt35', 'link40')"onMouseOut="HideTip('tt35')">mxFastOrganicLayout</a>, <ahref="mxParallelEdgeLayout-js.html#mxParallelEdgeLayout"class=LClassid=link41onMouseOver="ShowTip(event, 'tt36', 'link41')"onMouseOut="HideTip('tt36')">mxParallelEdgeLayout</a>, <ahref="mxPartitionLayout-js.html#mxPartitionLayout"class=LClassid=link42onMouseOver="ShowTip(event, 'tt37', 'link42')"onMouseOut="HideTip('tt37')">mxPartitionLayout</a>, <ahref="mxStackLayout-js.html#mxStackLayout"class=LClassid=link43onMouseOver="ShowTip(event, 'tt38', 'link43')"onMouseOut="HideTip('tt38')">mxStackLayout</a></p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxGraphLayout">mxGraphLayout</a></td><tdclass=SDescription>Base class for all layout algorithms in mxGraph. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphLayout.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphLayout.mxGraphLayout"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGraphLayout</a></td><tdclass=SDescription>Constructs a new layout using the given layouts.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphLayout.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphLayout.graph"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">graph</a></td><tdclass=SDescription>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">mxGraph</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphLayout.useBoundingBox"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">useBoundingBox</a></td><tdclass=SDescription>Boolean indicating if the bounding box of the label should be used if its available. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphLayout.parent"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">parent</a></td><tdclass=SDescription>The parent cell of the layout, if any</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphLayout.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphLayout.moveCell"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">moveCell</a></td><tdclass=SDescription>Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.mxGraphLayout"></a>mxGraphLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxGraphLayout(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new layout using the given layouts.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription>Enclosing</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link44onMouseOver="ShowTip(event, 'tt3', 'link44')"onMouseOut="HideTip('tt3')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.useBoundingBox"></a>useBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.useBoundingBox</td></tr></table></blockquote><p>Boolean indicating if the bounding box of the label should be used if its available. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.parent"></a>parent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.parent</td></tr></table></blockquote><p>The parent cell of the layout, if any</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.moveCell"></a>moveCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.moveCell = function(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. index) so that the outcome of the layout will position the vertex as close to the point (x, y) as possible.</p><p>Empty implementation.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link45onMouseOver="ShowTip(event, 'tt13', 'link45')"onMouseOut="HideTip('tt13')">mxCell</a> which has been moved.</td></tr><tr><tdclass=CDLEntry>x</td><tdclass=CDLDescription>X-coordinate of the new cell location.</td></tr><tr><tdclass=CDLEntry>y</td><tdclass=CDLDescription>Y-coordinate of the new cell location.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.execute"></a>execute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.execute = function(</td><tdclass="PParameter prettyprint "nowrap>parent</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes the layout algorithm for the children of the given parent.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link46onMouseOver="ShowTip(event, 'tt13', 'link46')"onMouseOut="HideTip('tt13')">mxCell</a> whose children should be layed out.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.getGraph"></a>getGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.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="mxGraphLayout.getConstraint"></a>getConstraint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.getConstraint = function(</td><tdclass="PParameter prettyprint "nowrap>key,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>source</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the constraint for the given key and cell. The optional edge and source arguments are used to return inbound and outgoing routing- constraints for the given edge and vertex. This implementation always returns the value for the given key in the style of the given cell.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>Key of the constraint to be returned.</td></tr><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link47onMouseOver="ShowTip(event, 'tt13', 'link47')"onMouseOut="HideTip('tt13')">mxCell</a> whose constraint should be returned.</td></tr><tr><tdclass=CDLEntry>edge</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link48onMouseOver="ShowTip(event, 'tt13', 'link48')"onMouseOut="HideTip('tt13')">mxCell</a> that represents the connection whose constraint should be returned. Default is null.</td></tr><tr><tdclass=CDLEntry>source</td><tdclass=CDLDescription>Optional boolean that specifies if the connection is incoming or outgoing. Default is null.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.traverse"></a>traverse</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.traverse = function(</td><tdclass="PParameter prettyprint "nowrap>vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>directed,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>func,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>visited</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Traverses the (directed) graph invoking the given function for each visited vertex and edge. The function is invoked with the current vertex and the incoming edge as a parameter. This implementation makes sure each vertex is only visited once. The function may return false if the traversal should stop at the given vertex.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
});</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link49onMouseOver="ShowTip(event, 'tt13', 'link49')"onMouseOut="HideTip('tt13')">mxCell</a> that represents the vertex where the traversal starts.</td></tr><tr><tdclass=CDLEntry>directed</td><tdclass=CDLDescription>Optional boolean indicating if edges should only be traversed from source to target. Default is true.</td></tr><tr><tdclass=CDLEntry>func</td><tdclass=CDLDescription>Visitor function that takes the current vertex and the incoming edge as arguments. The traversal stops if the function returns false.</td></tr><tr><tdclass=CDLEntry>edge</td><tdclass=CDLDescription>Optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link50onMouseOver="ShowTip(event, 'tt13', 'link50')"onMouseOut="HideTip('tt13')">mxCell</a> that represents the incoming edge. This is null for the first step of the traversal.</td></tr><tr><tdclass=CDLEntry>visited</td><tdclass=CDLDescription>Optional <ahref="../util/mxDictionary-js.html#mxDictionary"class=LClassid=link51onMouseOver="ShowTip(event, 'tt39', 'link51')"onMouseOut="HideTip('tt39')">mxDictionary</a> of cell paths for the visited cells.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.isAncestor"></a>isAncestor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.isAncestor = function(</td><tdclass="PParameter prettyprint "nowrap>parent,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>child,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>traverseAncestors</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given parent is an ancestor of the given child.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link52onMouseOver="ShowTip(event, 'tt13', 'link52')"onMouseOut="HideTip('tt13')">mxCell</a> that specifies the parent.</td></tr><tr><tdclass=CDLEntry>child</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link53onMouseOver="ShowTip(event, 'tt13', 'link53')"onMouseOut="HideTip('tt13')">mxCell</a> that specifies the child.</td></tr><tr><tdclass=CDLEntry>traverseAncestors</td><tdclass=CDLDescription>boolean whether to</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.isVertexMovable"></a>isVertexMovable</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.isVertexMovable = function(</td><tdclass="PParameter prettyprint "nowrap>cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a boolean indicating if the given <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link54onMouseOver="ShowTip(event, 'tt13', 'link54')"onMouseOut="HideTip('tt13')">mxCell</a> is movable or bendable by the algorithm. This implementation returns true if the given cell is movable in the graph.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link55onMouseOver="ShowTip(event, 'tt13', 'link55')"onMouseOut="HideTip('tt13')">mxCell</a> whose movable state should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.isVertexIgnored"></a>isVertexIgnored</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.isVertexIgnored = function(</td><tdclass="PParameter prettyprint "nowrap>vertex</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a boolean indicating if the given <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link56onMouseOver="ShowTip(event, 'tt13', 'link56')"onMouseOut="HideTip('tt13')">mxCell</a> should be ignored by the algorithm. This implementation returns false for all vertices.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link57onMouseOver="ShowTip(event, 'tt13', 'link57')"onMouseOut="HideTip('tt13')">mxCell</a> whose ignored state should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.isEdgeIgnored"></a>isEdgeIgnored</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.isEdgeIgnored = function(</td><tdclass="PParameter prettyprint "nowrap>edge</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a boolean indicating if the given <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link58onMouseOver="ShowTip(event, 'tt13', 'link58')"onMouseOut="HideTip('tt13')">mxCell</a> should be ignored by the algorithm. This implementation returns false for all vertices.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link59onMouseOver="ShowTip(event, 'tt13', 'link59')"onMouseOut="HideTip('tt13')">mxCell</a> whose ignored state should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.setEdgeStyleEnabled"></a>setEdgeStyleEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.setEdgeStyleEnabled = function(</td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Disables or enables the edge style of the given edge.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.setOrthogonalEdge"></a>setOrthogonalEdge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.setOrthogonalEdge = function(</td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>value</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Disables or enables orthogonal end segments of the given edge.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.getParentOffset"></a>getParentOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.getParentOffset = function(</td><tdclass="PParameter prettyprint "nowrap>parent</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Determines the offset of the given parent to the parent of the layout</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.setEdgePoints"></a>setEdgePoints</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.setEdgePoints = function(</td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>points</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Replaces the array of mxPoints in the geometry of the given edge with the given array of mxPoints.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.setVertexLocation"></a>setVertexLocation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.setVertexLocation = function(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the new position of the given cell taking into account the size of the bounding box if <ahref="#mxGraphLayout.useBoundingBox"class=LVariableid=link60onMouseOver="ShowTip(event, 'tt4', 'link60')"onMouseOut="HideTip('tt4')">useBoundingBox</a> is true. The change is only carried out if the new location is not equal to the existing location, otherwise the geometry is not replaced with an updated instance. The new or old bounds are returned (including overlapping labels).</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link61onMouseOver="ShowTip(event, 'tt13', 'link61')"onMouseOut="HideTip('tt13')">mxCell</a> whose geometry is to be set.</td></tr><tr><tdclass=CDLEntry>x</td><tdclass=CDLDescription>Integer that defines the x-coordinate of the new location.</td></tr><tr><tdclass=CDLEntry>y</td><tdclass=CDLDescription>Integer that defines the y-coordinate of the new location.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.getVertexBounds"></a>getVertexBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.getVertexBounds = function(</td><tdclass="PParameter prettyprint "nowrap>cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link62onMouseOver="ShowTip(event, 'tt22', 'link62')"onMouseOut="HideTip('tt22')">mxRectangle</a> that defines the bounds of the given cell or the bounding box if <ahref="#mxGraphLayout.useBoundingBox"class=LVariableid=link63onMouseOver="ShowTip(event, 'tt4', 'link63')"onMouseOut="HideTip('tt4')">useBoundingBox</a> is true.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphLayout.arrangeGroups"></a>arrangeGroups</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.arrangeGroups = function(</td><tdclass="PParameter prettyprint "nowrap>cells,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>border,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>topBorder,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>rightBorder,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>bottomBorder,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>leftBorder</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Shortcut to <ahref="../view/mxGraph-js.html#mxGraph.updateGroupBounds"class=LFunctionid=link64onMouseOver="ShowTip(event, 'tt24', 'link64')"onMouseOut="HideTip('tt24')">mxGraph.updateGroupBounds</a> with moveGroup set to true.</p></div></div></div>
<divclass="CClass"><divclass=CTopic><h2class=CTitle><aname="WeightedCellSorter"></a>WeightedCellSorter</h2><divclass=CBody><p>A utility class used to track cells whilst sorting occurs on the weighted sum of their connected edges. Does not violate (x.compareTo(y)==0) == (x.equals(y))</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SGroup"><tdclass=SEntry><ahref="#WeightedCellSorter.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#WeightedCellSorter.WeightedCellSorter"id=link65onMouseOver="ShowTip(event, 'tt25', 'link65')"onMouseOut="HideTip('tt25')">WeightedCellSorter</a></td><tdclass=SDescription>Constructs a new weighted cell sorted for the given cell and weight.</td></tr><trclass="SGroup"><tdclass=SEntry><ahref="#WeightedCellSorter.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent1 SMarked"><tdclass=SEntry><ahref="#WeightedCellSorter.weightedValue"id=link66onMouseOver="ShowTip(event, 'tt26', 'link66')"onMouseOut="HideTip('tt26')">weightedValue</a></td><tdclass=SDescription>The weighted value of the cell stored.</td></tr><trclass="SVariable SIndent1"><tdclass=SEntry><ahref="#WeightedCellSorter.nudge"id=link67onMouseOver="ShowTip(event, 'tt27', 'link67')"onMouseOut="HideTip('tt27')">nudge</a></td><tdclass=SDescription>Whether or not to flip equal weight values.</td></tr><trclass="SVariable SIndent1 SMarked"><tdclass=SEntry><ahref="#WeightedCellSorter.visited"id=link68onMouseOver="ShowTip(event, 'tt28', 'link68')"onMouseOut="HideTip('tt28')">visited</a></td><tdclass=SDescription>Whether or not this cell has been visited in the current assignment.</td></tr><trclass="SVariable SIndent1"><tdclass=SEntry><ahref="#WeightedCellSorter.rankIndex"id=link69onMouseOver="ShowTip(event, 'tt29', 'link69')"onMouseOut="HideTip('tt29')">rankIndex</a></td><tdclass=SDescription>The index this cell is in the model rank.</td></tr><trclass="SVariable SIndent1 SMarked"><tdclass=SEntry><ahref="#WeightedCellSorter.cell"id=link70onMouseOver="ShowTip(event, 'tt30', 'link70')"onMouseOut="HideTip('tt30')">cell</a></td><tdclass=SDescription>The cell whose median value is being calculated.</td></tr><trclass="SGroup"><tdclass=SEntry><ahref="#WeightedCellSorter.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#WeightedCellSorter.compare"id=link71onMouseOver="ShowTip(event, 'tt31', 'link71')"onMouseOut="HideTip('tt31')">compare</a></td><tdclass=SDescription>Compares two WeightedCellSorters.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.WeightedCellSorter"></a>WeightedCellSorter</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function WeightedCellSorter(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>weightedValue</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new weighted cell sorted for the given cell and weight.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.weightedValue"></a>weightedValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WeightedCellSorter.prototype.weightedValue</td></tr></table></blockquote><p>The weighted value of the cell stored.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.nudge"></a>nudge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WeightedCellSorter.prototype.nudge</td></tr></table></blockquote><p>Whether or not to flip equal weight values.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.visited"></a>visited</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WeightedCellSorter.prototype.visited</td></tr></table></blockquote><p>Whether or not this cell has been visited in the current assignment.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.rankIndex"></a>rankIndex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WeightedCellSorter.prototype.rankIndex</td></tr></table></blockquote><p>The index this cell is in the model rank.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="WeightedCellSorter.cell"></a>cell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WeightedCellSorter.prototype.cell</td></tr></table></blockquote><p>The cell whose median value is being calculated.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxGraphLayout(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new layout using the given layouts.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph.</div></div><divclass=CToolTipid="tt3"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.useBoundingBox</td></tr></table></blockquote>Boolean indicating if the bounding box of the label should be used if its available. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.parent</td></tr></table></blockquote>The parent cell of the layout, if any</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.moveCell = function(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. </div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.execute = function(</td><tdclass="PParameter prettyprint "nowrap>parent</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Executes the layout algorithm for the children of the given parent.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphLayout.prototype.getGraph = function()</td></tr></table></blockquote>Returns the graph that this layout operates on.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.prototype.getConstraint = function(</td><tdclass="PParameter prettyprint "nowrap>key,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>source</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Returns the constraint for the given key and cell. </div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphLayout.traverse = function(</td><tdclass="PParameter prettyprint "nowrap>vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>directed,</td></tr><tr><td></td><tdclass="PParameter prettyprint "