<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.ignoreGrid"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">ignoreGrid</a></td><tdclass=SDescription>Default is false.</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, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">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, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">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, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">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, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">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, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">processEvent</a></td><tdclass=SDescription>Processes the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">mxMouseEvent</a> and invokes <ahref="#mxHandle.setPosition"class=LFunctionid=link12onMouseOver="ShowTip(event, 'tt7', 'link12')"onMouseOut="HideTip('tt7')">setPosition</a>.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxHandle.positionChanged"id=link13onMouseOver="ShowTip(event, 'tt12', 'link13')"onMouseOut="HideTip('tt12')">positionChanged</a></td><tdclass=SDescription>Called after <ahref="#mxHandle.setPosition"class=LFunctionid=link14onMouseOver="ShowTip(event, 'tt7', 'link14')"onMouseOut="HideTip('tt7')">se
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.mxHandle"></a>mxHandle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxHandle(</td><tdclass="PParameter prettyprint "nowrap>state,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cursor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>image</td><tdclass="PAfterParameters prettyprint "nowrap>)</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, 'tt26', 'link29')"onMouseOut="HideTip('tt26')">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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.ignoreGrid"></a>ignoreGrid</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxHandle.prototype.ignoreGrid</td></tr></table></blockquote><p>Default is false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.getPosition"></a>getPosition</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.getPosition = function(</td><tdclass="PParameter prettyprint "nowrap>bounds</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.setPosition = function(</td><tdclass="PParameter prettyprint "nowrap>bounds,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><tdclass="prettyprint">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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.copyStyle = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.positionChanged"></a>positionChanged</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxHandle.prototype.positionChanged = function()</td></tr></table></blockquote><p>Called after <ahref="#mxHandle.setPosition"class=LFunctionid=link33onMouseOver="ShowTip(event, 'tt7', 'link33')"onMouseOut="HideTip('tt7')">setPosition</a> has been called in <ahref="#mxHandle.processEvent"class=LFunctionid=link34onMouseOver="ShowTip(event, 'tt10', 'link34')"onMouseOut="HideTip('tt10')">processEvent</a>. This repaints the state using <ahref="../view/mxCellRenderer-js.html#mxCellRenderer"class=LClassid=link35onMouseOver="ShowTip(event, 'tt27', 'link35')"onMouseOut="HideTip('tt27')">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.createShape = function(</td><tdclass="PParameter prettyprint "nowrap>html</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.redraw"></a>redraw</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.rotatePoint = function(</td><tdclass="PParameter prettyprint "nowrap>pt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>alpha</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.flipPoint = function(</td><tdclass="PParameter prettyprint "nowrap>pt</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.snapPoint = function(</td><tdclass="PParameter prettyprint "nowrap>pt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>ignore</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxHandle.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxHandle.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys this handle.</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 mxHandle(</td><tdclass="PParameter prettyprint "nowrap>state,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cursor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>image</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxHandle.prototype.ignoreGrid</td></tr></table></blockquote>Default is false.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.getPosition = function(</td><tdclass="PParameter prettyprint "nowrap>bounds</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Hook for subclassers to return the current position of the handle.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.setPosition = function(</td><tdclass="PParameter prettyprint "nowrap>bounds,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>pt,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Hooks for subclassers to update the style in the state.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxHandle.prototype.execute = function()</td></tr></table></blockquote>Hook for subclassers to execute the handle.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.copyStyle = function(</td><tdclass="PParameter prettyprint "nowrap>key</td><tdclass="PAfterParameters prettyprint "nowrap>)</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="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxHandle.prototype.processEvent = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Processes the given mxMouseEvent and invokes setPosition.</div></div><divclass=CToolTipid="tt11"><divclass=CClass>Base class for all mouse events in mxGraph. </div></div><divclass=CToolTipid="tt12"><divclass=CFunction><