<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxDragSource"></a>mxDragSource</h1><divclass=CBody><p>Wrapper to create a drag source from a DOM element so that the element can be dragged over a graph and dropped into the graph as a new cell.</p><p>TODO: Problem is that in the dropHandler the current preview location is not available, so the preview and the dropHandler must match.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxDragSource">mxDragSource</a></td><tdclass=SDescription>Wrapper to create a drag source from a DOM element so that the element can be dragged over a graph and dropped into the graph as a new cell.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDragSource.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDragSource.mxDragSource"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxDragSource</a></td><tdclass=SDescription>Constructs a new drag source for the given element.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxDragSource.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDragSource.element"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">element</a></td><tdclass=SDescription>Reference to the DOM node which was made draggable.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDragSource.dropHandler"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">dropHandler</a></td><tdclass=SDescription>Holds the DOM node that is used to represent the drag preview. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDragSource.dragOffset"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">dragOffset</a></td><tdclass=SDescription><ahref="mxPoint-js.html#mxPoint"class=LClassid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">mxPoint</a> that specifies the offset of the <ahref="#mxDragSource.dragElement"class=LVariableid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">dragElement</a>. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDragSource.dragElement"id=link7onMouseOver="ShowTip(event, 'tt6', 'link7')"onMouseOut="HideTip('tt6')">dragElement</a></td><tdclass=SDescription>Holds the DOM node that is used to represent the drag preview. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDragSource.previewElement"id=link8onMouseOver="ShowTip(event, 'tt7', 'link8')"onMouseOut="HideTip('tt7')">previewElement</a></td><tdclass=SDescription>Optional <ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">mxRectangle</a> that specifies the unscaled size of the preview.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDragSource.enabled"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">enabled</a></td><tdclass=SDescription>Specifies if this drag source is enabled. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxDragSource.currentGraph"id=link11onMouseOver="ShowTip(event, 'tt10', 'link11')"onMouseOut="HideTip('tt10')">currentGraph</a></td><tdclass=SDescription>Reference to the <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link12onMouseOver="ShowTip(event, 'tt11', 'link12')"onMouseOut="HideTip('tt11')">mxGraph</a> that is the current drop target.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxDragSource.currentDropTarget"id=link13onMouseOver="ShowTip(event, 'tt12', 'link13')"onMouseOut="HideTip('tt12')">currentDropTarget</a></t
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.mxDragSource"></a>mxDragSource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxDragSource(</td><tdclass=PParameternowrap>element,</td></tr><tr><td></td><tdclass=PParameternowrap>dropHandler</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new drag source for the given element.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.element"></a>element</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.element</td></tr></table></blockquote><p>Reference to the DOM node which was made draggable.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dropHandler"></a>dropHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dropHandler</td></tr></table></blockquote><p>Holds the DOM node that is used to represent the drag preview. If this is null then the source element will be cloned and used for the drag preview.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragOffset"></a>dragOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragOffset</td></tr></table></blockquote><p><ahref="mxPoint-js.html#mxPoint"class=LClassid=link67onMouseOver="ShowTip(event, 'tt5', 'link67')"onMouseOut="HideTip('tt5')">mxPoint</a> that specifies the offset of the <ahref="#mxDragSource.dragElement"class=LVariableid=link68onMouseOver="ShowTip(event, 'tt6', 'link68')"onMouseOut="HideTip('tt6')">dragElement</a>. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragElement"></a>dragElement</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElement</td></tr></table></blockquote><p>Holds the DOM node that is used to represent the drag preview. If this is null then the source element will be cloned and used for the drag preview.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.previewElement"></a>previewElement</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.previewElement</td></tr></table></blockquote><p>Optional <ahref="mxRectangle-js.html#mxRectangle"class=LClassid=link69onMouseOver="ShowTip(event, 'tt8', 'link69')"onMouseOut="HideTip('tt8')">mxRectangle</a> that specifies the unscaled size of the preview.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.enabled"></a>enabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.enabled</td></tr></table></blockquote><p>Specifies if this drag source is enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.currentGraph"></a>currentGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGraph</td></tr></table></blockquote><p>Reference to the <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link70onMouseOver="ShowTip(event, 'tt11', 'link70')"onMouseOut="HideTip('tt11')">mxGraph</a> that is the current drop target.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.currentDropTarget"></a>currentDropTarget</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentDropTarget</td></tr></table></blockquote><p>Holds the current drop target under the mouse.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.currentPoint"></a>currentPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentPoint</td></tr></table></blockquote><p>Holds the current drop location.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.currentGuide"></a>currentGuide</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGuide</td></tr></table></blockquote><p>Holds an <ahref="mxGuide-js.html#mxGuide"class=LClassid=link71onMouseOver="ShowTip(event, 'tt15', 'link71')"onMouseOut="HideTip('tt15')">mxGuide</a> for the <ahref="#mxDragSource.currentGraph"class=LVariableid=link72onMouseOver="ShowTip(event, 'tt10', 'link72')"onMouseOut="HideTip('tt10')">currentGraph</a> if <dragPreview> is not null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.currentGuide"></a>currentGuide</h3><divclass=CBody><p>Holds an <ahref="mxGuide-js.html#mxGuide"class=LClassid=link73onMouseOver="ShowTip(event, 'tt15', 'link73')"onMouseOut="HideTip('tt15')">mxGuide</a> for the <ahref="#mxDragSource.currentGraph"class=LVariableid=link74onMouseOver="ShowTip(event, 'tt10', 'link74')"onMouseOut="HideTip('tt10')">currentGraph</a> if <dragPreview> is not null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.autoscroll"></a>autoscroll</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.autoscroll</td></tr></table></blockquote><p>Specifies if the graph should scroll automatically. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.guidesEnabled"></a>guidesEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.guidesEnabled</td></tr></table></blockquote><p>Specifies if <ahref="mxGuide-js.html#mxGuide"class=LClassid=link75onMouseOver="ShowTip(event, 'tt15', 'link75')"onMouseOut="HideTip('tt15')">mxGuide</a> should be enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.gridEnabled"></a>gridEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.gridEnabled</td></tr></table></blockquote><p>Specifies if the grid should be allowed. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.highlightDropTargets"></a>highlightDropTargets</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.highlightDropTargets</td></tr></table></blockquote><p>Specifies if drop targets should be highlighted. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragElementZIndex"></a>dragElementZIndex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElementZIndex</td></tr></table></blockquote><p>ZIndex for the drag element. Default is 100.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragElementOpacity"></a>dragElementOpacity</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElementOpacity</td></tr></table></blockquote><p>Opacity of the drag element in %. Default is 70.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.getGraphForEvent"></a>getGraphForEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.getGraphForEvent = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the graph for the given mouse event. This implementation returns null.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.getDropTarget"></a>getDropTarget</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.getDropTarget = function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates. This implementation uses <ahref="../view/mxGraph-js.html#mxGraph.getCellAt"class=LFunctionid=link82onMouseOver="ShowTip(event, 'tt42', 'link82')"onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.createDragElement"></a>createDragElement</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.createDragElement = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns a clone of the <dragElementPrototype> or the <ahref="#mxDragSource.element"class=LVariableid=link83onMouseOver="ShowTip(event, 'tt2', 'link83')"onMouseOut="HideTip('tt2')">element</a> if the former is not defined.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.createPreviewElement"></a>createPreviewElement</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.createPreviewElement = function(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns an element which can be used as a preview in the given graph.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.mouseDown"></a>mouseDown</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.mouseDown = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates. This implementation uses <ahref="../view/mxGraph-js.html#mxGraph.getCellAt"class=LFunctionid=link84onMouseOver="ShowTip(event, 'tt42', 'link84')"onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.stopDrag"></a>stopDrag</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.stopDrag = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes and destroys the <ahref="#mxDragSource.dragElement"class=LVariableid=link87onMouseOver="ShowTip(event, 'tt6', 'link87')"onMouseOut="HideTip('tt6')">dragElement</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.graphContainsEvent"></a>graphContainsEvent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.graphContainsEvent = function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given graph contains the given event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.mouseMove"></a>mouseMove</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.mouseMove = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the graph for the given event using <ahref="#mxDragSource.getGraphForEvent"class=LFunctionid=link88onMouseOver="ShowTip(event, 'tt28', 'link88')"onMouseOut="HideTip('tt28')">getGraphForEvent</a>, updates the <ahref="#mxDragSource.currentGraph"class=LVariableid=link89onMouseOver="ShowTip(event, 'tt10', 'link89')"onMouseOut="HideTip('tt10')">currentGraph</a>, calling <ahref="#mxDragSource.dragEnter"class=LFunctionid=link90onMouseOver="ShowTip(event, 'tt37', 'link90')"onMouseOut="HideTip('tt37')">dragEnter</a> and <ahref="#mxDragSource.dragExit"class=LFunctionid=link91onMouseOver="ShowTip(event, 'tt38', 'link91')"onMouseOut="HideTip('tt38')">dragExit</a> on the new and old graph, respectively, and invokes <ahref="#mxDragSource.dragOver"class=LFunctionid=link92onMouseOver="ShowTip(event, 'tt39', 'link92')"onMouseOut="HideTip('tt39')">dragOver</a> if <ahref="#mxDragSource.currentGraph"class=LVariableid=link93onMouseOver="ShowTip(event, 'tt10', 'link93')"onMouseOut="HideTip('tt10')">currentGraph</a> is not null.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.mouseUp"></a>mouseUp</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.mouseUp = function(</td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the mouse up event and invokes <ahref="#mxDragSource.drop"class=LFunctionid=link94onMouseOver="ShowTip(event, 'tt41', 'link94')"onMouseOut="HideTip('tt41')">drop</a>, <ahref="#mxDragSource.dragExit"class=LFunctionid=link95onMouseOver="ShowTip(event, 'tt38', 'link95')"onMouseOut="HideTip('tt38')">dragExit</a> and <ahref="#mxDragSource.stopDrag"class=LFunctionid=link96onMouseOver="ShowTip(event, 'tt34', 'link96')"onMouseOut="HideTip('tt34')">stopDrag</a> as required.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragEnter"></a>dragEnter</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.dragEnter = function(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Actives the given graph as a drop target.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragExit"></a>dragExit</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.dragExit = function(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Deactivates the given graph as a drop target.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.dragOver"></a>dragOver</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.dragOver = function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Implements autoscroll, updates the <ahref="#mxDragSource.currentPoint"class=LVariableid=link97onMouseOver="ShowTip(event, 'tt13', 'link97')"onMouseOut="HideTip('tt13')">currentPoint</a>, highlights any drop targets and updates the preview.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxDragSource.drop"></a>drop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxDragSource.prototype.drop = function(</td><tdclass=PParameternowrap>graph,</td></tr><tr><td></td><tdclass=PParameternowrap>evt,</td></tr><tr><td></td><tdclass=PParameternowrap>dropTarget,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates. This implementation uses <ahref="../view/mxGraph-js.html#mxGraph.getCellAt"class=LFunctionid=link98onMouseOver="ShowTip(event, 'tt42', 'link98')"onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</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 mxDragSource(</td><tdclass=PParameternowrap>element,</td></tr><tr><td></td><tdclass=PParameternowrap>dropHandler</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new drag source for the given element.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.element</td></tr></table></blockquote>Reference to the DOM node which was made draggable.</div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dropHandler</td></tr></table></blockquote>Holds the DOM node that is used to represent the drag preview. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragOffset</td></tr></table></blockquote>mxPoint that specifies the offset of the dragElement. </div></div><divclass=CToolTipid="tt5"><divclass=CClass>Implements a 2-dimensional vector with double precision coordinates.</div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElement</td></tr></table></blockquote>Holds the DOM node that is used to represent the drag preview. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.previewElement</td></tr></table></blockquote>Optional mxRectangle that specifies the unscaled size of the preview.</div></div><divclass=CToolTipid="tt8"><divclass=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.enabled</td></tr></table></blockquote>Specifies if this drag source is enabled. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGraph</td></tr></table></blockquote>Reference to the mxGraph that is the current drop target.</div></div><divclass=CToolTipid="tt11"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentDropTarget</td></tr></table></blockquote>Holds the current drop target under the mouse.</div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentPoint</td></tr></table></blockquote>Holds the current drop location.</div></div><divclass=CToolTipid="tt14"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGuide</td></tr></table></blockquote>Holds an mxGuide for the currentGraph if dragPreview is not null.</div></div><divclass=CToolTipid="tt15"><divclass=CClass>Implements the alignment of selection cells to other cells in the graph.</div></div><divclass=CToolTipid="tt16"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxDragSource.prototype.autoscroll</td></tr></table></blockquote>Specifies if the graph should scroll automatically. </div></div><divclass=CToolTipid