<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxGuide"></a>mxGuide</h1><divclass=CBody><p>Implements the alignment of selection cells to other cells in the graph.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxGuide">mxGuide</a></td><tdclass=SDescription>Implements the alignment of selection cells to other cells in the graph.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGuide.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.mxGuide"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGuide</a></td><tdclass=SDescription>Constructs a new guide object.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGuide.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.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> instance.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGuide.states"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">states</a></td><tdclass=SDescription>Contains the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">mxCellStates</a> that are used for alignment.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.horizontal"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">horizontal</a></td><tdclass=SDescription>Specifies if horizontal guides are enabled. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGuide.vertical"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">vertical</a></td><tdclass=SDescription>Specifies if vertical guides are enabled. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.vertical">vertical</a></td><tdclass=SDescription>Holds the <ahref="../shape/mxShape-js.html#mxShape"class=LClassid=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">mxShape</a> for the horizontal guide.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGuide.vertical">vertical</a></td><tdclass=SDescription>Holds the <ahref="../shape/mxShape-js.html#mxShape"class=LClassid=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">mxShape</a> for the vertical guide.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGuide.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.setStates"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">setStates</a></td><tdclass=SDescription>Sets the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link11onMouseOver="ShowTip(event, 'tt5', 'link11')"onMouseOut="HideTip('tt5')">mxCellStates</a> that should be used for alignment.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxGuide.isEnabledForEvent"id=link12onMouseOver="ShowTip(event, 'tt10', 'link12')"onMouseOut="HideTip('tt10')">isEnabledForEvent</a></td><tdclass=SDescription>Returns true if the guide should be enabled for the given native event. </td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGuide.getGuideTolerance"id=link13onMouseOver="ShowTip(event, 'tt11', 'link13')"onMouseOut="HideTip('tt11')">getGuideTolerance</a></td><tdclass=SDescription>Returns the tolerance for the g
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.mxGuide"></a>mxGuide</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxGuide(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>states</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new guide object.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link20onMouseOver="ShowTip(event, 'tt3', 'link20')"onMouseOut="HideTip('tt3')">mxGraph</a> instance.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.states"></a>states</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.states</td></tr></table></blockquote><p>Contains the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link21onMouseOver="ShowTip(event, 'tt5', 'link21')"onMouseOut="HideTip('tt5')">mxCellStates</a> that are used for alignment.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.horizontal"></a>horizontal</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.horizontal</td></tr></table></blockquote><p>Specifies if horizontal guides are enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.vertical"></a>vertical</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.vertical</td></tr></table></blockquote><p>Specifies if vertical guides are enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.vertical"></a>vertical</h3><divclass=CBody><p>Holds the <ahref="../shape/mxShape-js.html#mxShape"class=LClassid=link22onMouseOver="ShowTip(event, 'tt8', 'link22')"onMouseOut="HideTip('tt8')">mxShape</a> for the horizontal guide.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGuide.vertical"></a>vertical</h3><divclass=CBody><p>Holds the <ahref="../shape/mxShape-js.html#mxShape"class=LClassid=link23onMouseOver="ShowTip(event, 'tt8', 'link23')"onMouseOut="HideTip('tt8')">mxShape</a> for the vertical guide.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.setStates"></a>setStates</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.setStates = function(</td><tdclass=PParameternowrap>states</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link24onMouseOver="ShowTip(event, 'tt5', 'link24')"onMouseOut="HideTip('tt5')">mxCellStates</a> that should be used for alignment.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.isEnabledForEvent"></a>isEnabledForEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.isEnabledForEvent = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the guide should be enabled for the given native event. This implementation always returns true.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.getGuideTolerance"></a>getGuideTolerance</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.getGuideTolerance = function()</td></tr></table></blockquote><p>Returns the tolerance for the guides. Default value is gridSize * scale / 2.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.createGuideShape"></a>createGuideShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.createGuideShape = function(</td><tdclass=PParameternowrap>horizontal</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the mxShape to be used for painting the respective guide. This implementation returns a new, dashed and crisp <ahref="../shape/mxPolyline-js.html#mxPolyline"class=LClassid=link25onMouseOver="ShowTip(event, 'tt18', 'link25')"onMouseOut="HideTip('tt18')">mxPolyline</a> using <ahref="mxConstants-js.html#mxConstants.GUIDE_COLOR"class=LVariableid=link26onMouseOver="ShowTip(event, 'tt19', 'link26')"onMouseOut="HideTip('tt19')">mxConstants.GUIDE_COLOR</a> and <ahref="mxConstants-js.html#mxConstants.GUIDE_STROKEWIDTH"class=LVariableid=link27onMouseOver="ShowTip(event, 'tt20', 'link27')"onMouseOut="HideTip('tt20')">mxConstants.GUIDE_STROKEWIDTH</a> as the format.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>horizontal</td><tdclass=CDLDescription>Boolean that specifies which guide should be created.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.move"></a>move</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.move = function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>delta,</td></tr><tr><td></td><tdclass=PParameternowrap>gridEnabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Moves the <bounds> by the given <ahref="mxPoint-js.html#mxPoint"class=LClassid=link28onMouseOver="ShowTip(event, 'tt14', 'link28')"onMouseOut="HideTip('tt14')">mxPoint</a> and returnt the snapped point.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.hide"></a>hide</h3><divclass=CBody><p>Hides all current guides.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.hide"></a>hide</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.hide = function()</td></tr></table></blockquote><p>Hides all current guides.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.setVisible"></a>setVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.setVisible = function(</td><tdclass=PParameternowrap>visible</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows or hides the current guides.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGuide.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys all resources that this object uses.</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>function mxGuide(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>states</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new guide object.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph instance.</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 prettyprint"><tr><td>mxGuide.prototype.states</td></tr></table></blockquote>Contains the mxCellStates that are used for alignment.</div></div><divclass=CToolTipid="tt5"><divclass=CClass>Represents the current state of a cell in a given mxGraphView.</div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.horizontal</td></tr></table></blockquote>Specifies if horizontal guides are enabled. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.vertical</td></tr></table></blockquote>Specifies if vertical guides are enabled. </div></div><divclass=CToolTipid="tt8"><divclass=CClass>Base class for all shapes. </div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.setStates = function(</td><tdclass=PParameternowrap>states</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the mxCellStates that should be used for alignment.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.isEnabledForEvent = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns true if the guide should be enabled for the given native event. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGuide.prototype.getGuideTolerance = function()</td></tr></table></blockquote>Returns the tolerance for the guides. </div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.createGuideShape = function(</td><tdclass=PParameternowrap>horizontal</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the mxShape to be used for painting the respective guide. </div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGuide.prototype.move = function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>delta,</td></tr><tr><td></td><tdclass=PParameternowrap>gridEnabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Moves the bounds by the given mxPoint and