<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxParallelEdgeLayout"></a>mxParallelEdgeLayout</h1><divclass=CBody><p>Extends <ahref="mxGraphLayout-js.html#mxGraphLayout"class=LClassid=link9onMouseOver="ShowTip(event, 'tt1', 'link9')"onMouseOut="HideTip('tt1')">mxGraphLayout</a> for arranging parallel edges. This layout works on edges for all pairs of vertices where there is more than one edge connecting the latter.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var layout = new mxParallelEdgeLayout(graph);
layout.execute(graph.getDefaultParent());</pre></blockquote><p>To run the layout for the parallel edges of a changed edge only, the following code can be used.</p><blockquote><preclass="prettyprint">var layout = new mxParallelEdgeLayout(graph);
return !(model.isEdge(edge2) && ((src == src2 && trg == trg2) || (src == trg2 && trg == src2)));
};
};</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxParallelEdgeLayout">mxParallelEdgeLayout</a></td><tdclass=SDescription>Extends <ahref="mxGraphLayout-js.html#mxGraphLayout"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGraphLayout</a> for arranging parallel edges. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.mxCompactTreeLayout">mxCompactTreeLayout</a></td><tdclass=SDescription>Constructs a new fast organic layout for the specified graph.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.spacing"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">spacing</a></td><tdclass=SDescription>Defines the spacing between the parallels. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.execute"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">execute</a></td><tdclass=SDescription>Implements <ahref="mxGraphLayout-js.html#mxGraphLayout.execute"class=LFunctionid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxGraphLayout.execute</a>.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.findParallels"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">findParallels</a></td><tdclass=SDescription>Finds the parallel edges in the given parent.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.getEdgeId"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">getEdgeId</a></td><tdclass=SDescription>Returns a unique ID for the given edge. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.layout"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">layout</a></td><tdclass=SDescription>Lays out the parallel edges in the given array.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxParallelEdgeLayout.route"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">route</a></td><tdclass=SDescription>Routes the given edge via the given point.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.mxCompactTreeLayout"></a>mxCompactTreeLayout</h3><divclass=CBody><p>Constructs a new fast organic layout for the specified graph.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.spacing"></a>spacing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxParallelEdgeLayout.prototype.spacing</td></tr></table></blockquote><p>Defines the spacing between the parallels. Default is 20.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.findParallels"></a>findParallels</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.findParallels = function(</td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Finds the parallel edges in the given parent.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.getEdgeId"></a>getEdgeId</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.getEdgeId = function(</td><tdclass=PParameternowrap>edge</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a unique ID for the given edge. The id is independent of the edge direction and is built using the visible terminal of the given edge.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.layout"></a>layout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.layout = function(</td><tdclass=PParameternowrap>parallels</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Lays out the parallel edges in the given array.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxParallelEdgeLayout.route"></a>route</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.route = function(</td><tdclass=PParameternowrap>edge,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Routes the given edge via the given point.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CClass>Base class for all layout algorithms in mxGraph. </div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxParallelEdgeLayout.prototype.spacing</td></tr></table></blockquote>Defines the spacing between the parallels. </div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.execute = function(</td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Implements mxGraphLayout.execute.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphLayout.prototype.execute = function(</td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Executes the layout algorithm for the children of the given parent.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.findParallels = function(</td><tdclass=PParameternowrap>parent</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Finds the parallel edges in the given parent.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.getEdgeId = function(</td><tdclass=PParameternowrap>edge</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns a unique ID for the given edge. </div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.layout = function(</td><tdclass=PParameternowrap>parallels</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Lays out the parallel edges in the given array.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxParallelEdgeLayout.prototype.route = function(</td><tdclass=PParameternowrap>edge,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Routes the given edge via the given point.</div></div><!--END_ND_TOOLTIPS-->