<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxGraphHandler"></a>mxGraphHandler</h1><divclass=CBody><p>Graph event handler that handles selection. Individual cells are handled separately using <ahref="mxVertexHandler-js.html#mxVertexHandler"class=LClassid=link78onMouseOver="ShowTip(event, 'tt67', 'link78')"onMouseOut="HideTip('tt67')">mxVertexHandler</a> or one of the edge handlers. These handlers are created using <ahref="../view/mxGraph-js.html#mxGraph.createHandler"class=LFunctionid=link79onMouseOver="ShowTip(event, 'tt68', 'link79')"onMouseOut="HideTip('tt68')">mxGraph.createHandler</a> in <ahref="../view/mxGraphSelectionModel-js.html#mxGraphSelectionModel.cellAdded"class=LFunctionid=link80onMouseOver="ShowTip(event, 'tt69', 'link80')"onMouseOut="HideTip('tt69')">mxGraphSelectionModel.cellAdded</a>.</p><p>To avoid the container to scroll a moved cell into view, set <scrollAfterMove> to false.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxGraphHandler">mxGraphHandler</a></td><tdclass=SDescription>Graph event handler that handles selection. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphHandler.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphHandler.mxGraphHandler"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxGraphHandler</a></td><tdclass=SDescription>Constructs an event handler that creates handles for the selection cells.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphHandler.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphHandler.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="#mxGraphHandler.maxCells"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">maxCells</a></td><tdclass=SDescription>Defines the maximum number of cells to paint subhandles for. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphHandler.enabled"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">enabled</a></td><tdclass=SDescription>Specifies if events are handled. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphHandler.highlightEnabled"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">highlightEnabled</a></td><tdclass=SDescription>Specifies if drop targets under the mouse should be enabled. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphHandler.cloneEnabled"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">cloneEnabled</a></td><tdclass=SDescription>Specifies if cloning by control-drag is enabled. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphHandler.moveEnabled"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">moveEnabled</a></td><tdclass=SDescription>Specifies if moving is enabled. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphHandler.guidesEnabled"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">guidesEnabled</a></td><tdclass=SDescription>Specifies if other cells should be used for snapping the right, center or left side of the current selection. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphHandler.guide"id=link10onMouseOver="ShowTip(event,'tt10'
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.mxGraphHandler"></a>mxGraphHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxGraphHandler(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs an event handler that creates handles for the selection cells.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link81onMouseOver="ShowTip(event, 'tt3', 'link81')"onMouseOut="HideTip('tt3')">mxGraph</a>.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link82onMouseOver="ShowTip(event, 'tt3', 'link82')"onMouseOut="HideTip('tt3')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.maxCells"></a>maxCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.maxCells</td></tr></table></blockquote><p>Defines the maximum number of cells to paint subhandles for. Default is 50 for Firefox and 20 for IE. Set this to 0 if you want an unlimited number of handles to be displayed. This is only recommended if the number of cells in the graph is limited to a small number, eg. 500.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.enabled"></a>enabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.enabled</td></tr></table></blockquote><p>Specifies if events are handled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.highlightEnabled"></a>highlightEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.highlightEnabled</td></tr></table></blockquote><p>Specifies if drop targets under the mouse should be enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.cloneEnabled"></a>cloneEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.cloneEnabled</td></tr></table></blockquote><p>Specifies if cloning by control-drag is enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.moveEnabled"></a>moveEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.moveEnabled</td></tr></table></blockquote><p>Specifies if moving is enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.guidesEnabled"></a>guidesEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.guidesEnabled</td></tr></table></blockquote><p>Specifies if other cells should be used for snapping the right, center or left side of the current selection. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.guide"></a>guide</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.guide</td></tr></table></blockquote><p>Holds the <ahref="../util/mxGuide-js.html#mxGuide"class=LClassid=link83onMouseOver="ShowTip(event, 'tt11', 'link83')"onMouseOut="HideTip('tt11')">mxGuide</a> instance that is used for alignment.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.currentDx"></a>currentDx</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.currentDx</td></tr></table></blockquote><p>Stores the x-coordinate of the current mouse move.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.currentDy"></a>currentDy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.currentDy</td></tr></table></blockquote><p>Stores the y-coordinate of the current mouse move.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.updateCursor"></a>updateCursor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.updateCursor</td></tr></table></blockquote><p>Specifies if a move cursor should be shown if the mouse is over a movable cell. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.selectEnabled"></a>selectEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.selectEnabled</td></tr></table></blockquote><p>Specifies if selecting is enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.removeCellsFromParent"></a>removeCellsFromParent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.removeCellsFromParent</td></tr></table></blockquote><p>Specifies if cells may be moved out of their parents. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.connectOnDrop"></a>connectOnDrop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.connectOnDrop</td></tr></table></blockquote><p>Specifies if drop events are interpreted as new connections if no other drop action is defined. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.scrollOnMove"></a>scrollOnMove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.scrollOnMove</td></tr></table></blockquote><p>Specifies if the view should be scrolled so that a moved cell is visible. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.minimumSize"></a>minimumSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.minimumSize</td></tr></table></blockquote><p>Specifies the minimum number of pixels for the width and height of a selection border. Default is 6.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.previewColor"></a>previewColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.previewColor</td></tr></table></blockquote><p>Specifies the color of the preview shape. Default is black.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.htmlPreview"></a>htmlPreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.htmlPreview</td></tr></table></blockquote><p>Specifies if the graph container should be used for preview. If this is used then drop target detection relies entirely on <ahref="../view/mxGraph-js.html#mxGraph.getCellAt"class=LFunctionid=link84onMouseOver="ShowTip(event, 'tt70', 'link84')"onMouseOut="HideTip('tt70')">mxGraph.getCellAt</a> because the HTML preview does not “let events through”. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.shape"></a>shape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.shape</td></tr></table></blockquote><p>Reference to the <ahref="../shape/mxShape-js.html#mxShape"class=LClassid=link85onMouseOver="ShowTip(event, 'tt23', 'link85')"onMouseOut="HideTip('tt23')">mxShape</a> that represents the preview.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.scaleGrid"></a>scaleGrid</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.scaleGrid</td></tr></table></blockquote><p>Specifies if the grid should be scaled. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.rotationEnabled"></a>rotationEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.rotationEnabled</td></tr></table></blockquote><p>Specifies if the bounding box should allow for rotation. Default is true.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getInitialCellForEvent"></a>getInitialCellForEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.getInitialCellForEvent = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook to return initial cell for the given event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.consumeMouseEvent"></a>consumeMouseEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.consumeMouseEvent = function(</td><tdclass="PParameter prettyprint "nowrap>evtName,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Consumes the given mouse event. NOTE: This may be used to enable click events for links in labels on iOS as follows as consuming the initial touchStart disables firing the subsequent click evnent on the link.</p><p><code> mxGraphHandler.prototype.consumeMouseEvent = function(evtName, me) { var source = mxEvent.getSource(me.getEvent());</p><p>if (!mxEvent.isTouchEvent(me.getEvent()) || source.nodeName != ‘A’) { me.consume(); } } </code></p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.mouseDown"></a>mouseDown</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.mouseDown = function(</td><tdclass="PParameter prettyprint "nowrap>sender,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by selecing the given cell and creating a handle for it. By consuming the event all subsequent events of the gesture are redirected to this handler.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getGuideStates"></a>getGuideStates</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.getGuideStates = function()</td></tr></table></blockquote><p>Creates an array of cell states which should be used as guides.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getCells"></a>getCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.getCells = function(</td><tdclass="PParameter prettyprint "nowrap>initialCell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the cells to be modified by this handler. This implementation returns all selection cells that are movable, or the given initial cell if the given cell is not selected and movable. This handles the case of moving unselectable or unselected cells.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>initialCell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link96onMouseOver="ShowTip(event, 'tt46', 'link96')"onMouseOut="HideTip('tt46')">mxCell</a> that triggered this handler.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getPreviewBounds"></a>getPreviewBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.getPreviewBounds = function(</td><tdclass="PParameter prettyprint "nowrap>cells</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link97onMouseOver="ShowTip(event, 'tt43', 'link97')"onMouseOut="HideTip('tt43')">mxRectangle</a> used as the preview bounds for moving the given cells.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getBoundingBox"></a>getBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.getBoundingBox = function(</td><tdclass="PParameter prettyprint "nowrap>cells</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the union of the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link98onMouseOver="ShowTip(event, 'tt45', 'link98')"onMouseOut="HideTip('tt45')">mxCellStates</a> for the given array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link99onMouseOver="ShowTip(event, 'tt46', 'link99')"onMouseOut="HideTip('tt46')">mxCells</a>. For vertices, this method uses the bounding box of the corresponding shape if one exists. The bounding box of the corresponding text label and all controls and overlays are ignored. See also: <ahref="../view/mxGraphView-js.html#mxGraphView.getBounds"class=LFunctionid=link100onMouseOver="ShowTip(event, 'tt71', 'link100')"onMouseOut="HideTip('tt71')">mxGraphView.getBounds</a> and <ahref="../view/mxGraph-js.html#mxGraph.getBoundingBox"class=LFunctionid=link101onMouseOver="ShowTip(event, 'tt72', 'link101')"onMouseOut="HideTip('tt72')">mxGraph.getBoundingBox</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link102onMouseOver="ShowTip(event, 'tt46', 'link102')"onMouseOut="HideTip('tt46')">mxCells</a> whose bounding box should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.createPreviewShape"></a>createPreviewShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.createPreviewShape = function(</td><tdclass="PParameter prettyprint "nowrap>bounds</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the shape used to draw the preview for the given bounds.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.useGuidesForEvent"></a>useGuidesForEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.useGuidesForEvent = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the guides should be used for the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link103onMouseOver="ShowTip(event, 'tt50', 'link103')"onMouseOut="HideTip('tt50')">mxMouseEvent</a>. This implementation returns <ahref="../util/mxGuide-js.html#mxGuide.isEnabledForEvent"class=LFunctionid=link104onMouseOver="ShowTip(event, 'tt73', 'link104')"onMouseOut="HideTip('tt73')">mxGuide.isEnabledForEvent</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.snap"></a>snap</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.snap = function(</td><tdclass="PParameter prettyprint "nowrap>vector</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Snaps the given vector to the grid and returns the given mxPoint instance.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.getDelta"></a>getDelta</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.getDelta = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an <ahref="../util/mxPoint-js.html#mxPoint"class=LClassid=link105onMouseOver="ShowTip(event, 'tt53', 'link105')"onMouseOut="HideTip('tt53')">mxPoint</a> that represents the vector for moving the cells for the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link106onMouseOver="ShowTip(event, 'tt50', 'link106')"onMouseOut="HideTip('tt50')">mxMouseEvent</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.updateHint"></a>updateHint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.updateHint = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers do show details while the handler is active.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.removeHint"></a>removeHint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.removeHint = function()</td></tr></table></blockquote><p>Hooks for subclassers to hide details when the handler gets inactive.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.mouseMove"></a>mouseMove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.mouseMove = function(</td><tdclass="PParameter prettyprint "nowrap>sender,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by highlighting possible drop targets and updating the preview.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.updatePreviewShape"></a>updatePreviewShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.updatePreviewShape = function()</td></tr></table></blockquote><p>Updates the bounds of the preview shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.setHighlightColor"></a>setHighlightColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.setHighlightColor = function(</td><tdclass="PParameter prettyprint "nowrap>color</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the color of the rectangle used to highlight drop targets.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>color</td><tdclass=CDLDescription>String that represents the new highlight color.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.mouseUp"></a>mouseUp</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.mouseUp = function(</td><tdclass="PParameter prettyprint "nowrap>sender,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Handles the event by applying the changes to the selection cells.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.selectDelayed"></a>selectDelayed</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.selectDelayed = function(</td><tdclass="PParameter prettyprint "nowrap>me</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Implements the delayed selection for the given mouse event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.reset = function()</td></tr></table></blockquote><p>Resets the state of this handler.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.shouldRemoveCellsFromParent"></a>shouldRemoveCellsFromParent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(</td><tdclass="PParameter prettyprint "nowrap>parent,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>cells,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>evt</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cells should be removed from the parent for the specified mousereleased event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.destroyShapes"></a>destroyShapes</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.destroyShapes = function()</td></tr></table></blockquote><p>Destroy the preview and highlight shapes.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys the handler and all its resources and DOM nodes.</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 mxGraphHandler(</td><tdclass="PParameter prettyprint "nowrap>graph</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs an event handler that creates handles for the selection cells.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.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">mxGraphHandler.prototype.maxCells</td></tr></table></blockquote>Defines the maximum number of cells to paint subhandles for. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.enabled</td></tr></table></blockquote>Specifies if events are handled. </div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.highlightEnabled</td></tr></table></blockquote>Specifies if drop targets under the mouse should be enabled. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.cloneEnabled</td></tr></table></blockquote>Specifies if cloning by control-drag is enabled. </div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.moveEnabled</td></tr></table></blockquote>Specifies if moving is enabled. </div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.guidesEnabled</td></tr></table></blockquote>Specifies if other cells should be used for snapping the right, center or left side of the current selection. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.guide</td></tr></table></blockquote>Holds the mxGuide instance that is used for alignment.</div></div><divclass=CToolTipid="tt11"><divclass=CClass>Implements the alignment of selection cells to other cells in the graph.</div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.currentDx</td></tr></table></blockquote>Stores the x-coordinate of the current mouse move.</div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.currentDy</td></tr></table></blockquote>Stores the y-coordinate of the current mouse move.</div></div><divclass=CToolTipid="tt14"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.updateCursor</td></tr></table></blockquote>Specifies if a move cursor should be shown if the mouse is over a movable cell. </div></div><divclass=CToolTipid="tt15"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.selectEnabled