maxGraph/docs/js-api/files/util/mxDragSource-js.html

129 lines
73 KiB
HTML
Raw Normal View History

2012-05-21 20:32:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>mxDragSource</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.5 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
2013-05-23 16:14:48 +00:00
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxDragSource"></a>mxDragSource</h1><div class=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>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--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxDragSource" >mxDragSource</a></td><td class=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><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxDragSource.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxDragSource.mxDragSource" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxDragSource</a></td><td class=SDescription>Constructs a new drag source for the given element.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxDragSource.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxDragSource.element" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">element</a></td><td class=SDescription>Reference to the DOM node which was made draggable.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxDragSource.dropHandler" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">dropHandler</a></td><td class=SDescription>Holds the DOM node that is used to represent the drag preview. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxDragSource.dragOffset" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">dragOffset</a></td><td class=SDescription><a href="mxPoint-js.html#mxPoint" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">mxPoint</a> that specifies the offset of the <a href="#mxDragSource.dragElement" class=LVariable id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">dragElement</a>. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxDragSource.dragElement" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">dragElement</a></td><td class=SDescription>Holds the DOM node that is used to represent the drag preview. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxDragSource.previewElement" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">previewElement</a></td><td class=SDescription>Optional <a href="mxRectangle-js.html#mxRectangle" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">mxRectangle</a> that specifies the unscaled size of the preview.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxDragSource.enabled" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">enabled</a></td><td class=SDescription>Specifies if this drag source is enabled. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxDragSource.currentGraph" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">currentGraph</a></td><td class=SDescription>Reference to the <a href="../view/mxGraph-js.html#mxGraph" class=LClass id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">mxGraph</a> that is the current drop target.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxDragSource.currentDropTarget" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">currentDropTarget</a></td><td
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.Functions"></a>Functions</h3></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.mxDragSource"></a>mxDragSource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxDragSource(</td><td class=PParameter nowrap>element,</td></tr><tr><td></td><td class=PParameter nowrap>dropHandler</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new drag source for the given element.</p></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.Variables"></a>Variables</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.element"></a>element</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="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>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dropHandler"></a>dropHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dropHandler</td></tr></table></blockquote><p>Holds the DOM node that is used to represent the drag preview.&nbsp; If this is null then the source element will be cloned and used for the drag preview.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragOffset"></a>dragOffset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragOffset</td></tr></table></blockquote><p><a href="mxPoint-js.html#mxPoint" class=LClass id=link67 onMouseOver="ShowTip(event, 'tt5', 'link67')" onMouseOut="HideTip('tt5')">mxPoint</a> that specifies the offset of the <a href="#mxDragSource.dragElement" class=LVariable id=link68 onMouseOver="ShowTip(event, 'tt6', 'link68')" onMouseOut="HideTip('tt6')">dragElement</a>.&nbsp; Default is null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragElement"></a>dragElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElement</td></tr></table></blockquote><p>Holds the DOM node that is used to represent the drag preview.&nbsp; If this is null then the source element will be cloned and used for the drag preview.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.previewElement"></a>previewElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.previewElement</td></tr></table></blockquote><p>Optional <a href="mxRectangle-js.html#mxRectangle" class=LClass id=link69 onMouseOver="ShowTip(event, 'tt8', 'link69')" onMouseOut="HideTip('tt8')">mxRectangle</a> that specifies the unscaled size of the preview.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.enabled"></a>enabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.enabled</td></tr></table></blockquote><p>Specifies if this drag source is enabled.&nbsp; Default is true.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.currentGraph"></a>currentGraph</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGraph</td></tr></table></blockquote><p>Reference to the <a href="../view/mxGraph-js.html#mxGraph" class=LClass id=link70 onMouseOver="ShowTip(event, 'tt11', 'link70')" onMouseOut="HideTip('tt11')">mxGraph</a> that is the current drop target.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.currentDropTarget"></a>currentDropTarget</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentDropTarget</td></tr></table></blockquote><p>Holds the current drop target under the mouse.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.currentPoint"></a>currentPoint</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentPoint</td></tr></table></blockquote><p>Holds the current drop location.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.currentGuide"></a>currentGuide</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGuide</td></tr></table></blockquote><p>Holds an <a href="mxGuide-js.html#mxGuide" class=LClass id=link71 onMouseOver="ShowTip(event, 'tt15', 'link71')" onMouseOut="HideTip('tt15')">mxGuide</a> for the <a href="#mxDragSource.currentGraph" class=LVariable id=link72 onMouseOver="ShowTip(event, 'tt10', 'link72')" onMouseOut="HideTip('tt10')">currentGraph</a> if &lt;dragPreview&gt; is not null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.currentGuide"></a>currentGuide</h3><div class=CBody><p>Holds an <a href="mxGuide-js.html#mxGuide" class=LClass id=link73 onMouseOver="ShowTip(event, 'tt15', 'link73')" onMouseOut="HideTip('tt15')">mxGuide</a> for the <a href="#mxDragSource.currentGraph" class=LVariable id=link74 onMouseOver="ShowTip(event, 'tt10', 'link74')" onMouseOut="HideTip('tt10')">currentGraph</a> if &lt;dragPreview&gt; is not null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.autoscroll"></a>autoscroll</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.autoscroll</td></tr></table></blockquote><p>Specifies if the graph should scroll automatically.&nbsp; Default is true.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.guidesEnabled"></a>guidesEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.guidesEnabled</td></tr></table></blockquote><p>Specifies if <a href="mxGuide-js.html#mxGuide" class=LClass id=link75 onMouseOver="ShowTip(event, 'tt15', 'link75')" onMouseOut="HideTip('tt15')">mxGuide</a> should be enabled.&nbsp; Default is true.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.gridEnabled"></a>gridEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.gridEnabled</td></tr></table></blockquote><p>Specifies if the grid should be allowed.&nbsp; Default is true.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.highlightDropTargets"></a>highlightDropTargets</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.highlightDropTargets</td></tr></table></blockquote><p>Specifies if drop targets should be highlighted.&nbsp; Default is true.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragElementZIndex"></a>dragElementZIndex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElementZIndex</td></tr></table></blockquote><p>ZIndex for the drag element.&nbsp; Default is 100.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragElementOpacity"></a>dragElementOpacity</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragElementOpacity</td></tr></table></blockquote><p>Opacity of the drag element in %.&nbsp; Default is 70.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.Functions"></a>Functions</h3></div></div>
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.isEnabled"></a>isEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.isEnabled = function()</td></tr></table></blockquote><p>Returns <a href="#mxDragSource.enabled" class=LVariable id=link76 onMouseOver="ShowTip(event, 'tt9', 'link76')" onMouseOut="HideTip('tt9')">enabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.setEnabled"></a>setEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.setEnabled = function(</td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <a href="#mxDragSource.enabled" class=LVariable id=link77 onMouseOver="ShowTip(event, 'tt9', 'link77')" onMouseOut="HideTip('tt9')">enabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.isGuidesEnabled"></a>isGuidesEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.isGuidesEnabled = function()</td></tr></table></blockquote><p>Returns <a href="#mxDragSource.guidesEnabled" class=LVariable id=link78 onMouseOver="ShowTip(event, 'tt17', 'link78')" onMouseOut="HideTip('tt17')">guidesEnabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.setGuidesEnabled"></a>setGuidesEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.setGuidesEnabled = function(</td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <a href="#mxDragSource.guidesEnabled" class=LVariable id=link79 onMouseOver="ShowTip(event, 'tt17', 'link79')" onMouseOut="HideTip('tt17')">guidesEnabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.isGridEnabled"></a>isGridEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.isGridEnabled = function()</td></tr></table></blockquote><p>Returns <a href="#mxDragSource.gridEnabled" class=LVariable id=link80 onMouseOver="ShowTip(event, 'tt18', 'link80')" onMouseOut="HideTip('tt18')">gridEnabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.setGridEnabled"></a>setGridEnabled</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.setGridEnabled = function(</td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <a href="#mxDragSource.gridEnabled" class=LVariable id=link81 onMouseOver="ShowTip(event, 'tt18', 'link81')" onMouseOut="HideTip('tt18')">gridEnabled</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.getGraphForEvent"></a>getGraphForEvent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.getGraphForEvent = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the graph for the given mouse event.&nbsp; This implementation returns null.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.getDropTarget"></a>getDropTarget</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.getDropTarget = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates.&nbsp; This implementation uses <a href="../view/mxGraph-js.html#mxGraph.getCellAt" class=LFunction id=link82 onMouseOver="ShowTip(event, 'tt42', 'link82')" onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.createDragElement"></a>createDragElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.createDragElement = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns a clone of the &lt;dragElementPrototype&gt; or the <a href="#mxDragSource.element" class=LVariable id=link83 onMouseOver="ShowTip(event, 'tt2', 'link83')" onMouseOut="HideTip('tt2')">element</a> if the former is not defined.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.createPreviewElement"></a>createPreviewElement</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.createPreviewElement = function(</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</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>
2013-06-28 19:07:06 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.mouseDown"></a>mouseDown</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.mouseDown = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates.&nbsp; This implementation uses <a href="../view/mxGraph-js.html#mxGraph.getCellAt" class=LFunction id=link84 onMouseOver="ShowTip(event, 'tt42', 'link84')" onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</p><p>To ignore popup menu events for a drag source, this function can be overridden as follows.</p><blockquote><pre class="prettyprint">var mouseDown = dragSource.mouseDown;
dragSource.mouseDown = function(evt)
{
if (!mxEvent.isPopupTrigger(evt))
{
mouseDown.apply(this, arguments);
}
};</pre></blockquote></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.startDrag"></a>startDrag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.startDrag = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the <a href="#mxDragSource.dragElement" class=LVariable id=link85 onMouseOver="ShowTip(event, 'tt6', 'link85')" onMouseOut="HideTip('tt6')">dragElement</a> using <a href="#mxDragSource.createDragElement" class=LFunction id=link86 onMouseOver="ShowTip(event, 'tt30', 'link86')" onMouseOut="HideTip('tt30')">createDragElement</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.stopDrag"></a>stopDrag</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.stopDrag = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes and destroys the <a href="#mxDragSource.dragElement" class=LVariable id=link87 onMouseOver="ShowTip(event, 'tt6', 'link87')" onMouseOut="HideTip('tt6')">dragElement</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.graphContainsEvent"></a>graphContainsEvent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.graphContainsEvent = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given graph contains the given event.</p></div></div></div>
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.mouseMove"></a>mouseMove</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.mouseMove = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the graph for the given event using <a href="#mxDragSource.getGraphForEvent" class=LFunction id=link88 onMouseOver="ShowTip(event, 'tt28', 'link88')" onMouseOut="HideTip('tt28')">getGraphForEvent</a>, updates the <a href="#mxDragSource.currentGraph" class=LVariable id=link89 onMouseOver="ShowTip(event, 'tt10', 'link89')" onMouseOut="HideTip('tt10')">currentGraph</a>, calling <a href="#mxDragSource.dragEnter" class=LFunction id=link90 onMouseOver="ShowTip(event, 'tt37', 'link90')" onMouseOut="HideTip('tt37')">dragEnter</a> and <a href="#mxDragSource.dragExit" class=LFunction id=link91 onMouseOver="ShowTip(event, 'tt38', 'link91')" onMouseOut="HideTip('tt38')">dragExit</a> on the new and old graph, respectively, and invokes <a href="#mxDragSource.dragOver" class=LFunction id=link92 onMouseOver="ShowTip(event, 'tt39', 'link92')" onMouseOut="HideTip('tt39')">dragOver</a> if <a href="#mxDragSource.currentGraph" class=LVariable id=link93 onMouseOver="ShowTip(event, 'tt10', 'link93')" onMouseOut="HideTip('tt10')">currentGraph</a> is not null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.mouseUp"></a>mouseUp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.mouseUp = function(</td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Processes the mouse up event and invokes <a href="#mxDragSource.drop" class=LFunction id=link94 onMouseOver="ShowTip(event, 'tt41', 'link94')" onMouseOut="HideTip('tt41')">drop</a>, <a href="#mxDragSource.dragExit" class=LFunction id=link95 onMouseOver="ShowTip(event, 'tt38', 'link95')" onMouseOut="HideTip('tt38')">dragExit</a> and <a href="#mxDragSource.stopDrag" class=LFunction id=link96 onMouseOver="ShowTip(event, 'tt34', 'link96')" onMouseOut="HideTip('tt34')">stopDrag</a> as required.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-06-28 19:07:06 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragEnter"></a>dragEnter</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.dragEnter = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Actives the given graph as a drop target.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-06-28 19:07:06 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragExit"></a>dragExit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.dragExit = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Deactivates the given graph as a drop target.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.dragOver"></a>dragOver</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.dragOver = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Implements autoscroll, updates the <a href="#mxDragSource.currentPoint" class=LVariable id=link97 onMouseOver="ShowTip(event, 'tt13', 'link97')" onMouseOut="HideTip('tt13')">currentPoint</a>, highlights any drop targets and updates the preview.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2012-12-18 13:09:38 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxDragSource.drop"></a>drop</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxDragSource.prototype.drop = function(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>evt,</td></tr><tr><td></td><td class=PParameter nowrap>dropTarget,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the drop target for the given graph and coordinates.&nbsp; This implementation uses <a href="../view/mxGraph-js.html#mxGraph.getCellAt" class=LFunction id=link98 onMouseOver="ShowTip(event, 'tt42', 'link98')" onMouseOut="HideTip('tt42')">mxGraph.getCellAt</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
</div><!--Content-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
2014-01-08 16:23:20 +00:00
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../editor/mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxEditor-js.html">mxEditor</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPopupMenuHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></d
2012-05-21 20:32:26 +00:00
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([10], 13);// --></script></div><!--Menu-->
<!--START_ND_TOOLTIPS-->
2013-06-28 19:07:06 +00:00
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxDragSource(</td><td class=PParameter nowrap>element,</td></tr><tr><td></td><td class=PParameter nowrap>dropHandler</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new drag source for the given element.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.element</td></tr></table></blockquote>Reference to the DOM node which was made draggable.</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="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><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.dragOffset</td></tr></table></blockquote>mxPoint that specifies the offset of the dragElement. </div></div><div class=CToolTip id="tt5"><div class=CClass>Implements a 2-dimensional vector with double precision coordinates.</div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="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><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.previewElement</td></tr></table></blockquote>Optional mxRectangle that specifies the unscaled size of the preview.</div></div><div class=CToolTip id="tt8"><div class=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.enabled</td></tr></table></blockquote>Specifies if this drag source is enabled. </div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGraph</td></tr></table></blockquote>Reference to the mxGraph that is the current drop target.</div></div><div class=CToolTip id="tt11"><div class=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentDropTarget</td></tr></table></blockquote>Holds the current drop target under the mouse.</div></div><div class=CToolTip id="tt13"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentPoint</td></tr></table></blockquote>Holds the current drop location.</div></div><div class=CToolTip id="tt14"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.currentGuide</td></tr></table></blockquote>Holds an mxGuide for the currentGraph if dragPreview is not null.</div></div><div class=CToolTip id="tt15"><div class=CClass>Implements the alignment of selection cells to other cells in the graph.</div></div><div class=CToolTip id="tt16"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxDragSource.prototype.autoscroll</td></tr></table></blockquote>Specifies if the graph should scroll automatically. </div></div><div class=CToolTip id
2012-05-21 20:32:26 +00:00
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>