<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxHandle"></a>mxHandle</h1><divclass=CBody><p>Implements a single custom handle for vertices.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxHandle">mxHandle</a></td><tdclass=SDescription>Implements a single custom handle for vertices.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxHandle.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.mxHandle"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxHandle</a></td><tdclass=SDescription>Constructs a new handle for the given state.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxHandle.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.cursor"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">cursor</a></td><tdclass=SDescription>Specifies the cursor to be used for this handle. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxHandle.image"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">image</a></td><tdclass=SDescription>Specifies the <ahref="../util/mxImage-js.html#mxImage"class=LClassid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxImage</a> to be used to render the handle. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.image">image</a></td><tdclass=SDescription>Specifies the <ahref="../util/mxImage-js.html#mxImage"class=LClassid=link5onMouseOver="ShowTip(event, 'tt4', 'link5')"onMouseOut="HideTip('tt4')">mxImage</a> to be used to render the handle. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxHandle.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.getPosition"id=link6onMouseOver="ShowTip(event, 'tt5', 'link6')"onMouseOut="HideTip('tt5')">getPosition</a></td><tdclass=SDescription>Hook for subclassers to return the current position of the handle.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxHandle.setPosition"id=link7onMouseOver="ShowTip(event, 'tt6', 'link7')"onMouseOut="HideTip('tt6')">setPosition</a></td><tdclass=SDescription>Hooks for subclassers to update the style in the <state>.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.execute"id=link8onMouseOver="ShowTip(event, 'tt7', 'link8')"onMouseOut="HideTip('tt7')">execute</a></td><tdclass=SDescription>Hook for subclassers to execute the handle.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxHandle.copyStyle"id=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">copyStyle</a></td><tdclass=SDescription>Sets the cell style with the given name to the corresponding value in <state>.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxHandle.processEvent"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">processEvent</a></td><tdclass=SDescription>Processes the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link11onMouseOver="ShowTip(event, 'tt10', 'link11')"onMouseOut="HideTip('tt10')">mxMouseEvent</a> and invokes <ahref="#mxHandle.setPosition"class=LFunctionid=link12onMouseOver="ShowTip(event, 'tt6', 'link12')"onMouseOut="HideTip('tt6')">setPosition</a>.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxHandle.positionChanged"id=link13onMouseOver="ShowTip(event, 'tt11', 'link13')"onMouseOut="HideTip('tt11')">positionChanged</a></td><tdclass=SDescription>Called after <ahref="#mxHandle.setPosition"class=LFunction
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.mxHandle"></a>mxHandle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxHandle(</td><tdclass=PParameternowrap>state,</td></tr><tr><td></td><tdclass=PParameternowrap>cursor,</td></tr><tr><td></td><tdclass=PParameternowrap>image</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new handle for the given state.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>state</td><tdclass=CDLDescription><ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link29onMouseOver="ShowTip(event, 'tt25', 'link29')"onMouseOut="HideTip('tt25')">mxCellState</a> of the cell to be handled.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxHandle.cursor"></a>cursor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.cursor</td></tr></table></blockquote><p>Specifies the cursor to be used for this handle. Default is ‘default’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxHandle.image"></a>image</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.image</td></tr></table></blockquote><p>Specifies the <ahref="../util/mxImage-js.html#mxImage"class=LClassid=link30onMouseOver="ShowTip(event, 'tt4', 'link30')"onMouseOut="HideTip('tt4')">mxImage</a> to be used to render the handle. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxHandle.image"></a>image</h3><divclass=CBody><p>Specifies the <ahref="../util/mxImage-js.html#mxImage"class=LClassid=link31onMouseOver="ShowTip(event, 'tt4', 'link31')"onMouseOut="HideTip('tt4')">mxImage</a> to be used to render the handle. Default is null.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.getPosition"></a>getPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.getPosition = function(</td><tdclass=PParameternowrap>bounds</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers to return the current position of the handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.setPosition"></a>setPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.setPosition = function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>pt,</td></tr><tr><td></td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Hooks for subclassers to update the style in the <state>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.execute"></a>execute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.execute = function()</td></tr></table></blockquote><p>Hook for subclassers to execute the handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.copyStyle"></a>copyStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.copyStyle = function(</td><tdclass=PParameternowrap>key</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the cell style with the given name to the corresponding value in <state>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.processEvent"></a>processEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.processEvent = function(</td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link32onMouseOver="ShowTip(event, 'tt10', 'link32')"onMouseOut="HideTip('tt10')">mxMouseEvent</a> and invokes <ahref="#mxHandle.setPosition"class=LFunctionid=link33onMouseOver="ShowTip(event, 'tt6', 'link33')"onMouseOut="HideTip('tt6')">setPosition</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.positionChanged"></a>positionChanged</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.positionChanged = function()</td></tr></table></blockquote><p>Called after <ahref="#mxHandle.setPosition"class=LFunctionid=link34onMouseOver="ShowTip(event, 'tt6', 'link34')"onMouseOut="HideTip('tt6')">setPosition</a> has been called in <ahref="#mxHandle.processEvent"class=LFunctionid=link35onMouseOver="ShowTip(event, 'tt9', 'link35')"onMouseOut="HideTip('tt9')">processEvent</a>. This repaints the state using <ahref="../view/mxCellRenderer-js.html#mxCellRenderer"class=LClassid=link36onMouseOver="ShowTip(event, 'tt26', 'link36')"onMouseOut="HideTip('tt26')">mxCellRenderer</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.getRotation"></a>getRotation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.getRotation = function()</td></tr></table></blockquote><p>Returns the rotation defined in the style of the cell.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.getTotalRotation"></a>getTotalRotation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.getTotalRotation = function()</td></tr></table></blockquote><p>Returns the rotation from the style and the rotation from the direction of the cell.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.init = function()</td></tr></table></blockquote><p>Creates and initializes the shapes required for this handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.createShape"></a>createShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.createShape = function(</td><tdclass=PParameternowrap>html</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns the shape for this handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.initShape"></a>initShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.initShape = function(</td><tdclass=PParameternowrap>html</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Initializes <shape> and sets its cursor.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.redraw"></a>redraw</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.redraw = function()</td></tr></table></blockquote><p>Renders the shape for this handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.isHtmlRequired"></a>isHtmlRequired</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.isHtmlRequired = function()</td></tr></table></blockquote><p>Returns true if this handle should be rendered in HTML. This returns true if the text node is in the graph container.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.rotatePoint"></a>rotatePoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.rotatePoint = function(</td><tdclass=PParameternowrap>pt,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Rotates the point by the given angle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.flipPoint"></a>flipPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.flipPoint = function(</td><tdclass=PParameternowrap>pt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Flips the given point vertically and/or horizontally.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.snapPoint"></a>snapPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.snapPoint = function(</td><tdclass=PParameternowrap>pt,</td></tr><tr><td></td><tdclass=PParameternowrap>ignore</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Snaps the given point to the grid if ignore is false. This modifies the given point in-place and also returns it.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.setVisible"></a>setVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.setVisible = function(</td><tdclass=PParameternowrap>visible</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows or hides this handle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.reset = function()</td></tr></table></blockquote><p>Resets the state of this handle by setting its visibility to true.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxHandle(</td><tdclass=PParameternowrap>state,</td></tr><tr><td></td><tdclass=PParameternowrap>cursor,</td></tr><tr><td></td><tdclass=PParameternowrap>image</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new handle for the given state.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.cursor</td></tr></table></blockquote>Specifies the cursor to be used for this handle. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.image</td></tr></table></blockquote>Specifies the mxImage to be used to render the handle. </div></div><divclass=CToolTipid="tt4"><divclass=CClass>Encapsulates the URL, width and height of an image.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.getPosition = function(</td><tdclass=PParameternowrap>bounds</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Hook for subclassers to return the current position of the handle.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.setPosition = function(</td><tdclass=PParameternowrap>bounds,</td></tr><tr><td></td><tdclass=PParameternowrap>pt,</td></tr><tr><td></td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Hooks for subclassers to update the style in the state.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.execute = function()</td></tr></table></blockquote>Hook for subclassers to execute the handle.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.copyStyle = function(</td><tdclass=PParameternowrap>key</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the cell style with the given name to the corresponding value in state.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxHandle.prototype.processEvent = function(</td><tdclass=PParameternowrap>me</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Processes the given mxMouseEvent and invokes setPosition.</div></div><divclass=CToolTipid="tt10"><divclass=CClass>Base class for all mouse events in mxGraph. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.positionChanged = function()</td></tr></table></blockquote>Called after setPosition has been called in processEvent. </div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxHandle.prototype.getRotation = function()</td></tr></table></blockquote>Returns the rotation defined in the styl