<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=link88onMouseOver="ShowTip(event, 'tt77', 'link88')"onMouseOut="HideTip('tt77')">mxVertexHandler</a> or one of the edge handlers. These handlers are created using <ahref="../view/mxGraph-js.html#mxGraph.createHandler"class=LFunctionid=link89onMouseOver="ShowTip(event, 'tt78', 'link89')"onMouseOut="HideTip('tt78')">mxGraph.createHandler</a> in <ahref="../view/mxGraphSelectionModel-js.html#mxGraphSelectionModel.cellAdded"class=LFunctionid=link90onMouseOver="ShowTip(event, 'tt79', 'link90')"onMouseOut="HideTip('tt79')">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=link91onMouseOver="ShowTip(event, 'tt3', 'link91')"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=link92onMouseOver="ShowTip(event, 'tt3', 'link92')"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=link93onMouseOver="ShowTip(event, 'tt11', 'link93')"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.removeEmptyParents"></a>removeEmptyParents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.removeEmptyParents</td></tr></table></blockquote><p>If empty parents should be removed from the model after all child cells have been moved out. 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=link94onMouseOver="ShowTip(event, 'tt80', 'link94')"onMouseOut="HideTip('tt80')">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=link95onMouseOver="ShowTip(event, 'tt24', 'link95')"onMouseOut="HideTip('tt24')">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="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.maxLivePreview"></a>maxLivePreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.maxLivePreview</td></tr></table></blockquote><p>Maximum number of cells for which live preview should be used. Default is 0 which means no live preview.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.allowLivePreview"></a>allowLivePreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.allowLivePreview</td></tr></table></blockquote><p>If live preview is allowed on this system. Default is true for systems with SVG support.</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 event 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=link106onMouseOver="ShowTip(event, 'tt49', 'link106')"onMouseOut="HideTip('tt49')">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=link107onMouseOver="ShowTip(event, 'tt46', 'link107')"onMouseOut="HideTip('tt46')">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=link108onMouseOver="ShowTip(event, 'tt48', 'link108')"onMouseOut="HideTip('tt48')">mxCellStates</a> for the given array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link109onMouseOver="ShowTip(event, 'tt49', 'link109')"onMouseOut="HideTip('tt49')">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=link110onMouseOver="ShowTip(event, 'tt81', 'link110')"onMouseOut="HideTip('tt81')">mxGraphView.getBounds</a> and <ahref="../view/mxGraph-js.html#mxGraph.getBoundingBox"class=LFunctionid=link111onMouseOver="ShowTip(event, 'tt82', 'link111')"onMouseOut="HideTip('tt82')">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=link112onMouseOver="ShowTip(event, 'tt49', 'link112')"onMouseOut="HideTip('tt49')">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.addStates"></a>addStates</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.addStates = function(</td><tdclass="PParameter prettyprint "nowrap>cell,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dict</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the states for the given cell recursively to the given dictionary.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.isCellMoving"></a>isCellMoving</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.isCellMoving = function(</td><tdclass="PParameter prettyprint "nowrap>cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is currently being moved.</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=link113onMouseOver="ShowTip(event, 'tt55', 'link113')"onMouseOut="HideTip('tt55')">mxMouseEvent</a>. This implementation returns <ahref="../util/mxGuide-js.html#mxGuide.isEnabledForEvent"class=LFunctionid=link114onMouseOver="ShowTip(event, 'tt83', 'link114')"onMouseOut="HideTip('tt83')">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=link115onMouseOver="ShowTip(event, 'tt58', 'link115')"onMouseOut="HideTip('tt58')">mxPoint</a> that represents the vector for moving the cells for the given <ahref="../util/mxMouseEvent-js.html#mxMouseEvent"class=LClassid=link116onMouseOver="ShowTip(event, 'tt55', 'link116')"onMouseOut="HideTip('tt55')">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.updatePreview"></a>updatePreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.updatePreview = function(</td><tdclass="PParameter prettyprint "nowrap>remote</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the bounds of the preview shape.</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.updateLivePreview"></a>updateLivePreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.updateLivePreview = function(</td><tdclass="PParameter prettyprint "nowrap>dx,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dy</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the bounds of the preview shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.redrawHandles"></a>redrawHandles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.redrawHandles = function(</td><tdclass="PParameter prettyprint "nowrap>states</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Redraws the preview shape for the given states array.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.resetPreviewStates"></a>resetPreviewStates</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxGraphHandler.prototype.resetPreviewStates = function(</td><tdclass="PParameter prettyprint "nowrap>states</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Resets the given preview states array.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.resetLivePreview"></a>resetLivePreview</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxGraphHandler.prototype.resetLivePreview = function()</td></tr></table></blockquote><p>Resets the livew preview.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphHandler.reset"></a>reset</h3><divclass=CBody><p>Resets the state of this handler.</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.moveCells"></a>moveCells</h3><divclass=CBody><p>Moves the given cells by the specified amount.</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