ext.dd.droptarget.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 1,142 行 · 第 1/5 页
SVN-BASE
1,142 行
<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 alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DropTarget-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 inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DropTarget-getDragEl"></a>
<b>getDragEl</b>() : HTMLElement <div class="mdesc">
<div class="short">Returns a reference to the actual element to drag. By default this isthe same as the html element, but it can be as...</div>
<div class="long">
Returns a reference to the actual element to drag. By default this isthe same as the html element, but it can be assigned to anotherelement. An example of this can be found in Ext.dd.DDProxy <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>HTMLElement</code><div class="sub-desc">the html element</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#getDragEl" href="output/Ext.dd.DragDrop.html#getDragEl">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.DropTarget-getEl"></a>
<b>getEl</b>() : HTMLElement <div class="mdesc">
<div class="short">Returns a reference to the linked element</div>
<div class="long">
Returns a reference to the linked element <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>HTMLElement</code><div class="sub-desc">the html element</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#getEl" href="output/Ext.dd.DragDrop.html#getEl">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.DropTarget-init"></a>
<b>init</b>( <code>id the</code>, <code>String sGroup</code>, <code>object config</code> ) : void <div class="mdesc">
<div class="short">Sets up the DragDrop object. Must be called in the constructor of anyExt.dd.DragDrop subclass</div>
<div class="long">
Sets up the DragDrop object. Must be called in the constructor of anyExt.dd.DragDrop subclass <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>the</code> : id<div class="sub-desc">id of the linked element</div></li><li><code>sGroup</code> : String<div class="sub-desc">the group of related items</div></li><li><code>config</code> : object<div class="sub-desc">configuration attributes</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="#init" href="output/Ext.dd.DragDrop.html#init">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.DropTarget-initTarget"></a>
<b>initTarget</b>( <code>id the</code>, <code>String sGroup</code>, <code>object config</code> ) : void <div class="mdesc">
<div class="short">Initializes Targeting functionality only... the object does notget a mousedown handler.</div>
<div class="long">
Initializes Targeting functionality only... the object does notget a mousedown handler. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>the</code> : id<div class="sub-desc">id of the linked element</div></li><li><code>sGroup</code> : String<div class="sub-desc">the group of related items</div></li><li><code>config</code> : object<div class="sub-desc">configuration attributes</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="#initTarget" href="output/Ext.dd.DragDrop.html#initTarget">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.DropTarget-isLocked"></a>
<b>isLocked</b>() : boolean <div class="mdesc">
<div class="short">Returns true if this instance is locked, or the drag drop mgr is locked(meaning that all drag/drop is disabled on th...</div>
<div class="long">
Returns true if this instance is locked, or the drag drop mgr is locked(meaning that all drag/drop is disabled on the page.) <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>boolean</code><div class="sub-desc">true if this obj or all drag/drop is locked, else false</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#isLocked" href="output/Ext.dd.DragDrop.html#isLocked">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.DropTarget-isValidHandleChild"></a>
<b>isValidHandleChild</b>( <code>HTMLElement node</code> ) : boolean <div class="mdesc">
<div class="short">Checks the tag exclusion list to see if this click should be ignored</div>
<div class="long">
Checks the tag exclusion list to see if this click should be ignored <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>node</code> : HTMLElement<div class="sub-desc">the HTMLElement to evaluate</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>boolean</code><div class="sub-desc">true if this is a valid tag type, false if not</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.dd.DragDrop" ext:member="#isValidHandleChild" href="output/Ext.dd.DragDrop.html#isValidHandleChild">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.DropTarget-lock"></a>
<b>lock</b>() : void <div class="mdesc">
<div class="short">Lock this instance</div>
<div class="long">
Lock 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="#lock" href="output/Ext.dd.DragDrop.html#lock">DragDrop</a></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.DropTarget-notifyDrop"></a>
<b>notifyDrop</b>( <code>Ext.dd.DragSource source</code>, <code>Event e</code>, <code>Object data</code> ) : Boolean <div class="mdesc">
<div class="short">The function a Ext.dd.DragSource calls once to notify this drop target that the dragged item hasbeen dropped on it. ...</div>
<div class="long">
The function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop target that the dragged item hasbeen dropped on it. This method has no default implementation and returns false, so you must provide animplementation that does something to process the drop event and returns true so that the drag source'srepair action does not run. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>source</code> : Ext.dd.DragSource<div class="sub-desc">The drag source that was dragged over this drop target</div></li><li><code>e</code> : Event<div class="sub-desc">The event</div></li><li><code>data</code> : Object<div class="sub-desc">An object containing arbitrary data supplied by the drag source</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the drop was valid, else false</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DropTarget</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.dd.DropTarget-notifyEnter"></a>
<b>notifyEnter</b>( <code>Ext.dd.DragSource source</code>, <code>Event e</code>, <code>Object data</code> ) : String <div class="mdesc">
<div class="short">The function a Ext.dd.DragSource calls once to notify this drop target that the source is now over thetarget. This ...</div>
<div class="long">
The function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop target that the source is now over thetarget. This default implementation adds the CSS class specified by overClass (if any) to the drop elementand returns the dropAllowed config value. This method should be overridden if drop validation is required. <div class="mdetail-params">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?