ext.dd.dragsource.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 1,144 行 · 第 1/5 页
SVN-BASE
1,144 行
before the dragged item enters the drop target and optionally cancel the onDragEnter. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>target</code> : Ext.dd.DragDrop<div class="sub-desc">The drop target</div></li><li><code>e</code> : Event<div class="sub-desc">The event object</div></li><li><code>id</code> : String<div class="sub-desc">The id of the dragged element</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">isValid True if the drag event is valid, else false to cancel</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DragSource</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-beforeDragOut"></a>
<b>beforeDragOut</b>( <code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code> ) : Boolean <div class="mdesc">
<div class="short">An empty function by default, but provided so that you can perform a custom action before the draggeditem is dragged...</div>
<div class="long">
An empty function by default, but provided so that you can perform a custom action before the draggeditem is dragged out of the target without dropping, and optionally cancel the onDragOut. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>target</code> : Ext.dd.DragDrop<div class="sub-desc">The drop target</div></li><li><code>e</code> : Event<div class="sub-desc">The event object</div></li><li><code>id</code> : String<div class="sub-desc">The id of the dragged element</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">isValid True if the drag event is valid, else false to cancel</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DragSource</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-beforeDragOver"></a>
<b>beforeDragOver</b>( <code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code> ) : Boolean <div class="mdesc">
<div class="short">An empty function by default, but provided so that you can perform a custom actionwhile the dragged item is over the...</div>
<div class="long">
An empty function by default, but provided so that you can perform a custom actionwhile the dragged item is over the drop target and optionally cancel the onDragOver. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>target</code> : Ext.dd.DragDrop<div class="sub-desc">The drop target</div></li><li><code>e</code> : Event<div class="sub-desc">The event object</div></li><li><code>id</code> : String<div class="sub-desc">The id of the dragged element</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">isValid True if the drag event is valid, else false to cancel</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DragSource</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-beforeInvalidDrop"></a>
<b>beforeInvalidDrop</b>( <code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code> ) : Boolean <div class="mdesc">
<div class="short">An empty function by default, but provided so that you can perform a custom action after an invaliddrop has occurred.</div>
<div class="long">
An empty function by default, but provided so that you can perform a custom action after an invaliddrop has occurred. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>target</code> : Ext.dd.DragDrop<div class="sub-desc">The drop target</div></li><li><code>e</code> : Event<div class="sub-desc">The event object</div></li><li><code>id</code> : String<div class="sub-desc">The id of the dragged element</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">isValid True if the invalid drop should proceed, else false to cancel</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DragSource</td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-cachePosition"></a>
<b>cachePosition</b>( <code>iPageX the</code>, <code>iPageY the</code> ) : void <div class="mdesc">
<div class="short">Saves the most recent position so that we can reset the constraints andtick marks on-demand. We need to know this s...</div>
<div class="long">
Saves the most recent position so that we can reset the constraints andtick marks on-demand. We need to know this so that we can calculate thenumber of pixels the element is offset from its original position. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>the</code> : iPageX<div class="sub-desc">current x position (optional, this just makes it so wedon't have to look it up again)</div></li><li><code>the</code> : iPageY<div class="sub-desc">current y position (optional, this just makes it so wedon't have to look it up again)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DD" ext:member="#cachePosition" href="output/Ext.dd.DD.html#cachePosition">DD</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-clearConstraints"></a>
<b>clearConstraints</b>() : void <div class="mdesc">
<div class="short">Clears any constraints applied to this instance. Also clears tickssince they can't exist independent of a constrain...</div>
<div class="long">
Clears any constraints applied to this instance. Also clears tickssince they can't exist independent of a constraint at this time. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#clearConstraints" href="output/Ext.dd.DragDrop.html#clearConstraints">DragDrop</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-clearTicks"></a>
<b>clearTicks</b>() : void <div class="mdesc">
<div class="short">Clears any tick interval defined for this instance</div>
<div class="long">
Clears any tick interval defined for this instance <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#clearTicks" href="output/Ext.dd.DragDrop.html#clearTicks">DragDrop</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-constrainTo"></a>
<b>constrainTo</b>( <code>Mixed constrainTo</code>, <span class="optional" title="Optional">[<code>Object/Number pad</code>]</span>, <span class="optional" title="Optional">[<code>Boolean inContent</code>]</span> ) : void <div class="mdesc">
<div class="short">Initializes the drag drop object's constraints to restrict movement to a certain element.Usage:
var dd = new Ext.d...</div>
<div class="long">
Initializes the drag drop object's constraints to restrict movement to a certain element.Usage:
<pre><code>var dd = <b>new</b> Ext.dd.DDProxy(<em>"dragDiv1"</em>, <em>"proxytest"</em>, { dragElId: <em>"existingProxyDiv"</em> }); dd.startDrag = <b>function</b>(){ <b>this</b>.constrainTo(<em>"parent-id"</em>); };</code></pre>Or you can initalize it using the <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> object:
<pre><code>Ext.get(<em>"dragDiv1"</em>).initDDProxy(<em>"proxytest"</em>, {dragElId: <em>"existingProxyDiv"</em>}, { startDrag : <b>function</b>(){ <b>this</b>.constrainTo(<em>"parent-id"</em>); } });</code></pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>constrainTo</code> : Mixed<div class="sub-desc">The element to constrain to.</div></li><li><code>pad</code> : Object/Number<div class="sub-desc">(optional) Pad provides a way to specify "padding" of the constraints,and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) oran object containing the sides to pad. For example: {right:10, bottom:10}</div></li><li><code>inContent</code> : Boolean<div class="sub-desc">(optional) Constrain the draggable in the content box of the element (inside padding and borders)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#constrainTo" href="output/Ext.dd.DragDrop.html#constrainTo">DragDrop</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-createFrame"></a>
<b>createFrame</b>() : void <div class="mdesc">
<div class="short">Creates the proxy element if it does not yet exist</div>
<div class="long">
Creates the proxy element if it does not yet exist <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DDProxy" ext:member="#createFrame" href="output/Ext.dd.DDProxy.html#createFrame">DDProxy</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-endDrag"></a>
<b>endDrag</b>( <code>Event e</code> ) : void <div class="mdesc">
<div class="short">Fired when we are done dragging the object</div>
<div class="long">
Fired when we are done dragging the object <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#endDrag" href="output/Ext.dd.DragDrop.html#endDrag">DragDrop</a></td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DragSource-getDragData"></a>
<b>getDragData</b>() : Object <div class="mdesc">
<div class="short">Returns the data object associated with this drag source</div>
<div class="long">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?