2104 lines
No EOL
117 KiB
HTML
2104 lines
No EOL
117 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Ext.dd.DragSource</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
<!-- GC -->
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools">
|
|
<img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="Ext.dd.DragSource.html" target="_blank">Print Friendly</a><br/>
|
|
|
|
</div>
|
|
<h1>Class Ext.dd.DragSource</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>Ext.dd</td></tr>
|
|
<tr><td class="label">Class:</td><td>DragSource</td></tr>
|
|
<tr><td class="label">Extends:</td><td><a href="Ext.dd.DDProxy.html">DDProxy</a></td></tr>
|
|
<tr><td class="label">Subclasses:</td><td><a href="Ext.dd.DragZone.html">DragZone</a></td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="DragSource.jss.html">DragSource.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
A simple class that provides the basic implementation needed to make any element draggable. </div>
|
|
<br />
|
|
<a href="#properties">Properties</a>
|
|
- <a href="#methods">Methods</a>
|
|
- <a href="#events">Events</a>
|
|
- <a href="#configs">Config Options</a>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Property</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#available">available</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#available">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The availabe property is false until the linked dom element is accessible.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#centerFrame">centerFrame</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DDProxy.html#centerFrame">DDProxy</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default the frame is positioned exactly where the drag element is, so
|
|
we use the cursor offset provided by Ext.dd....</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config">config</a> : object</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#config">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Configuration attributes passed into the constructor</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#groups">groups</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#groups">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The group defines a logical collection of DragDrop objects that are
|
|
related. Instances only get events when interact...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hasOuterHandles">hasOuterHandles</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#hasOuterHandles">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">By default, drags can only be initiated if the mousedown occurs in the
|
|
region the linked element is. This is done in...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#id">id</a> : String</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#id">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The id of the element associated with this object. This is what we
|
|
refer to as the "linked element" because the size...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleClasses">invalidHandleClasses</a> : string[]</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#invalidHandleClasses">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An indexted array of css class names for elements that will be ignored
|
|
if clicked.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleIds">invalidHandleIds</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#invalidHandleIds">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An associative array of ids for elements that will be ignored if clicked</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#invalidHandleTypes">invalidHandleTypes</a> : string:</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#invalidHandleTypes">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An associative array of HTML tags that will be ignored if clicked.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#maintainOffset">maintainOffset</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#maintainOffset">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Maintain offsets when we resetconstraints. Set to true when you want
|
|
the position of the element relative to its par...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onStartDrag">onStartDrag</a> : Object</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action once the initial
|
|
drag event has be...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#primaryButtonOnly">primaryButtonOnly</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#primaryButtonOnly">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default the drag and drop instance will only respond to the primary
|
|
button click (left button for a right-handed m...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#resizeFrame">resizeFrame</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DDProxy.html#resizeFrame">DDProxy</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">By default we resize the drag frame to be the same size as the element
|
|
we want to drag (this is to get the frame effe...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#scroll">scroll</a> : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#scroll">DD</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">When set to true, the utility automatically tries to scroll the browser
|
|
window wehn a drag and drop element is dragge...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#xTicks">xTicks</a> : int[]</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#xTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Array of pixel locations the element will snap to if we specified a
|
|
horizontal graduation/interval. This array is ge...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#yTicks">yTicks</a> : int[]</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#yTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Array of pixel locations the element will snap to if we specified a
|
|
vertical graduation/interval. This array is gene...</td>
|
|
</tr>
|
|
</table>
|
|
<a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#DragSource">DragSource</a>(<code>String/HTMLElement/Element el</code>, <code>Object config</code>)</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleClass">addInvalidHandleClass</a>(<code>string cssClass</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#addInvalidHandleClass">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Lets you specify a css class of elements that will not initiate a drag</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleId">addInvalidHandleId</a>(<code>string id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#addInvalidHandleId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Lets you to specify an element id for a child of a drag handle
|
|
that should not initiate a drag</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addInvalidHandleType">addInvalidHandleType</a>(<code>string tagName</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#addInvalidHandleType">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Allows you to specify a tag name that should not start a drag operation
|
|
when clicked. This is designed to facilitate...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addToGroup">addToGroup</a>(<code>sGroup {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#addToGroup">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Add this instance to a group of related drag/drop objects. All
|
|
instances belong to at least one group, and can belon...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#afterDragDrop">afterDragDrop</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
after a valid drag drop has occurr...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#afterDragEnter">afterDragEnter</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
when the dragged item enters the d...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#afterDragOut">afterDragOut</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
after the dragged item is dragged ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#afterDragOver">afterDragOver</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
while the dragged item is over the...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#afterInvalidDrop">afterInvalidDrop</a>(<code>Event e</code>, <code>String id</code>) : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
after an invalid drop has occurred...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#alignElWithMouse">alignElWithMouse</a>(<code>HTMLElement el</code>, <code>int iPageX</code>, <code>int iPageY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#alignElWithMouse">DD</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Sets the element to the location of the mousedown or click event,
|
|
maintaining the cursor location relative to the loc...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#applyConfig">applyConfig</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#applyConfig">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Applies the configuration parameters that were passed into the constructor.
|
|
This is supposed to happen at each level ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#autoOffset">autoOffset</a>(<code>int iPageX</code>, <code>int iPageY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#autoOffset">DD</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Sets the pointer offset to the distance between the linked element's top
|
|
left corner and the location the element was...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#beforeDragDrop">beforeDragDrop</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action before the dragged
|
|
item is dropped...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#beforeDragEnter">beforeDragEnter</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
before the dragged item enters the...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#beforeDragOut">beforeDragOut</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action before the dragged
|
|
item is dragged...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#beforeDragOver">beforeDragOver</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action
|
|
while the dragged item is over the...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#beforeInvalidDrop">beforeInvalidDrop</a>(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action after an invalid
|
|
drop has occurred.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#cachePosition">cachePosition</a>(<code>iPageX the</code>, <code>iPageY the</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#cachePosition">DD</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Saves the most recent position so that we can reset the constraints and
|
|
tick marks on-demand. We need to know this s...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#clearConstraints">clearConstraints</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#clearConstraints">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Clears any constraints applied to this instance. Also clears ticks
|
|
since they can't exist independent of a constrain...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#clearTicks">clearTicks</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#clearTicks">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Clears any tick interval defined for this instance</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#createFrame">createFrame</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DDProxy.html#createFrame">DDProxy</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Creates the proxy element if it does not yet exist</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#endDrag">endDrag</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#endDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fired when we are done dragging the object</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getDragData">getDragData</a>() : Object</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns the data object associated with this drag source</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getDragEl">getDragEl</a>() : HTMLElement</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#getDragEl">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns a reference to the actual element to drag. By default this is
|
|
the same as the html element, but it can be as...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getEl">getEl</a>() : HTMLElement</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#getEl">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a reference to the linked element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getProxy">getProxy</a>() : Ext.dd.StatusProxy</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the drag source's underlying <a href="Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hideProxy">hideProxy</a>() : void</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Hides the drag source's <a href="Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#init">init</a>(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#init">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Sets up the DragDrop object. Must be called in the constructor of any
|
|
Ext.dd.DragDrop subclass</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#initFrame">initFrame</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DDProxy.html#initFrame">DDProxy</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Initialization for the drag frame element. Must be called in the
|
|
constructor of all subclasses</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#initTarget">initTarget</a>(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#initTarget">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Initializes Targeting functionality only... the object does not
|
|
get a mousedown handler.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isLocked">isLocked</a>() : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#isLocked">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns true if this instance is locked, or the drag drop mgr is locked
|
|
(meaning that all drag/drop is disabled on th...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isTarget">isTarget</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#isTarget">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">By default, all insances can be a drop target. This can be disabled by
|
|
setting isTarget to false.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isValidHandleChild">isValidHandleChild</a>(<code>HTMLElement node</code>) : boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#isValidHandleChild">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Checks the tag exclusion list to see if this click should be ignored</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#lock">lock</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#lock">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Lock this instance</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onAvailable">onAvailable</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onAvailable">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Override the onAvailable method to do what is needed after the initial
|
|
position was determined.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onBeforeDrag">onBeforeDrag</a>(<code>Object data</code>, <code>Event e</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">An empty function by default, but provided so that you can perform a custom action before the initial
|
|
drag event begi...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDrag">onDrag</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called during the onMouseMove event while dragging an
|
|
object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragDrop">onDragDrop</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onDragDrop">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called when this item is dropped on another DragDrop
|
|
obj</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragEnter">onDragEnter</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onDragEnter">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called when this element fist begins hovering over
|
|
another DragDrop obj</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragOut">onDragOut</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onDragOut">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called when we are no longer hovering over an element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onDragOver">onDragOver</a>(<code>Event e</code>, <code>String|DragDrop[] id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onDragOver">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Abstract method called when this element is hovering over another
|
|
DragDrop obj</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onInvalidDrop">onInvalidDrop</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onInvalidDrop">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called when this item is dropped on an area with no
|
|
drop target</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onMouseDown">onMouseDown</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onMouseDown">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Event handler that fires when a drag/drop obj gets a mousedown</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#onMouseUp">onMouseUp</a>(<code>Event e</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#onMouseUp">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Event handler that fires when a drag/drop obj gets a mouseup</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#padding">padding</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#padding">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The padding configured for this drag and drop object for calculating
|
|
the drop zone intersection with this object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeFromGroup">removeFromGroup</a>(<code>string sGroup</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#removeFromGroup">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Remove's this instance from the supplied interaction group</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleClass">removeInvalidHandleClass</a>(<code>string cssClass</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#removeInvalidHandleClass">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Unsets an invalid css class</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleId">removeInvalidHandleId</a>(<code>string id</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#removeInvalidHandleId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Unsets an invalid handle id</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeInvalidHandleType">removeInvalidHandleType</a>(<code>string tagName</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#removeInvalidHandleType">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Unsets an excluded tag name set by addInvalidHandleType</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#resetConstraints">resetConstraints</a>(<code>boolean maintainOffset</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#resetConstraints">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">resetConstraints must be called if you manually reposition a dd element.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setDelta">setDelta</a>(<code>int iDeltaX</code>, <code>int iDeltaY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#setDelta">DD</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Sets the pointer offset. You can call this directly to force the
|
|
offset to be in a particular location (e.g., pass i...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setDragElId">setDragElId</a>(<code>id {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setDragElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Allows you to specify that an element other than the linked element
|
|
will be moved with the cursor during a drag</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setDragElPos">setDragElPos</a>(<code>int iPageX</code>, <code>int iPageY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DD.html#setDragElPos">DD</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Sets the drag element to the location of the mousedown or click event,
|
|
maintaining the cursor location relative to th...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setHandleElId">setHandleElId</a>(<code>id {string}</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setHandleElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Allows you to specify a child of the linked element that should be
|
|
used to initiate the drag operation. An example o...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setInitialPosition">setInitialPosition</a>(<code>int diffX</code>, <code>int diffY</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setInitialPosition">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Stores the initial placement of the linked element.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setOuterHandleElId">setOuterHandleElId</a>(<code>id the</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setOuterHandleElId">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Allows you to set an element outside of the linked element as a drag
|
|
handle</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setPadding">setPadding</a>(<code>int iTop</code>, <code>int iRight</code>, <code>int iBot</code>, <code>int iLeft</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setPadding">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Configures the padding for the target zone in px. Effectively expands
|
|
(or reduces) the virtual object size for targe...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setXConstraint">setXConstraint</a>(<code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setXConstraint">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">By default, the element can be dragged any place on the screen. Use
|
|
this method to limit the horizontal travel of th...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setYConstraint">setYConstraint</a>(<code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#setYConstraint">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">By default, the element can be dragged any place on the screen. Set
|
|
this to limit the vertical travel of the element...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#startDrag">startDrag</a>(<code>int X</code>, <code>int Y</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#startDrag">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Abstract method called after a drag/drop object is clicked
|
|
and the drag or mousedown time thresholds have beeen met.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#toString">toString</a>() : string</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#toString">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">toString method</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unlock">unlock</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#unlock">DragDrop</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Unlock this instace</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unreg">unreg</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.dd.DragDrop.html#unreg">DragDrop</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Remove all drag and drop hooks for this element</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<div class="no-members">This class has no public events.</div> <a name="configs"></a>
|
|
<h2>Config Options</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Config Options</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-dropAllowed">dropAllowed</a> : String</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-dropNotAllowed">dropNotAllowed</a> : String</td>
|
|
<td class="msource" rowspan="2">DragSource</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").</td>
|
|
</tr>
|
|
</table>
|
|
<h2 class="mdetail-head">Property Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="available"></a>
|
|
<div class="mdetail">
|
|
<h3>available</i></h3>
|
|
<code>public boolean available</code>
|
|
<div class="mdetail-desc">
|
|
The availabe property is false until the linked dom element is accessible. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#available">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="centerFrame"></a>
|
|
<div class="mdetail alt">
|
|
<h3>centerFrame</i></h3>
|
|
<code>public boolean centerFrame</code>
|
|
<div class="mdetail-desc">
|
|
By default the frame is positioned exactly where the drag element is, so
|
|
we use the cursor offset provided by Ext.dd.DD. Another option that works only if
|
|
you do not have constraints on the obj is to have the drag frame centered
|
|
around the cursor. Set centerFrame to true for this effect. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DDProxy.html#centerFrame">DDProxy</a>.</div>
|
|
</div>
|
|
<a name="config"></a>
|
|
<div class="mdetail">
|
|
<h3>config</i></h3>
|
|
<code>public object config</code>
|
|
<div class="mdetail-desc">
|
|
Configuration attributes passed into the constructor </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#config">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="groups"></a>
|
|
<div class="mdetail alt">
|
|
<h3>groups</i></h3>
|
|
<code>public string: groups</code>
|
|
<div class="mdetail-desc">
|
|
The group defines a logical collection of DragDrop objects that are
|
|
related. Instances only get events when interacting with other
|
|
DragDrop object in the same group. This lets us define multiple
|
|
groups using a single DragDrop subclass if we want. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#groups">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="hasOuterHandles"></a>
|
|
<div class="mdetail">
|
|
<h3>hasOuterHandles</i></h3>
|
|
<code>public boolean hasOuterHandles</code>
|
|
<div class="mdetail-desc">
|
|
By default, drags can only be initiated if the mousedown occurs in the
|
|
region the linked element is. This is done in part to work around a
|
|
bug in some browsers that mis-report the mousedown if the previous
|
|
mouseup happened outside of the window. This property is set to true
|
|
if outer handles are defined. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#hasOuterHandles">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="id"></a>
|
|
<div class="mdetail alt">
|
|
<h3>id</i></h3>
|
|
<code>public String id</code>
|
|
<div class="mdetail-desc">
|
|
The id of the element associated with this object. This is what we
|
|
refer to as the "linked element" because the size and position of
|
|
this element is used to determine when the drag and drop objects have
|
|
interacted. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#id">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleClasses"></a>
|
|
<div class="mdetail">
|
|
<h3>invalidHandleClasses</i></h3>
|
|
<code>public string[] invalidHandleClasses</code>
|
|
<div class="mdetail-desc">
|
|
An indexted array of css class names for elements that will be ignored
|
|
if clicked. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#invalidHandleClasses">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleIds"></a>
|
|
<div class="mdetail alt">
|
|
<h3>invalidHandleIds</i></h3>
|
|
<code>public string: invalidHandleIds</code>
|
|
<div class="mdetail-desc">
|
|
An associative array of ids for elements that will be ignored if clicked </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#invalidHandleIds">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="invalidHandleTypes"></a>
|
|
<div class="mdetail">
|
|
<h3>invalidHandleTypes</i></h3>
|
|
<code>public string: invalidHandleTypes</code>
|
|
<div class="mdetail-desc">
|
|
An associative array of HTML tags that will be ignored if clicked. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#invalidHandleTypes">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="maintainOffset"></a>
|
|
<div class="mdetail alt">
|
|
<h3>maintainOffset</i></h3>
|
|
<code>public boolean maintainOffset</code>
|
|
<div class="mdetail-desc">
|
|
Maintain offsets when we resetconstraints. Set to true when you want
|
|
the position of the element relative to its parent to stay the same
|
|
when the page changes </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#maintainOffset">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onStartDrag"></a>
|
|
<div class="mdetail">
|
|
<h3>onStartDrag</i></h3>
|
|
<code>public Object onStartDrag</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action once the initial
|
|
drag event has begun. The drag cannot be canceled from this function. </div>
|
|
<div class="mdetail-def">This property is defined by DragSource.</div>
|
|
</div>
|
|
<a name="primaryButtonOnly"></a>
|
|
<div class="mdetail alt">
|
|
<h3>primaryButtonOnly</i></h3>
|
|
<code>public boolean primaryButtonOnly</code>
|
|
<div class="mdetail-desc">
|
|
By default the drag and drop instance will only respond to the primary
|
|
button click (left button for a right-handed mouse). Set to true to
|
|
allow drag and drop to start with any mouse click that is propogated
|
|
by the browser </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#primaryButtonOnly">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="resizeFrame"></a>
|
|
<div class="mdetail">
|
|
<h3>resizeFrame</i></h3>
|
|
<code>public boolean resizeFrame</code>
|
|
<div class="mdetail-desc">
|
|
By default we resize the drag frame to be the same size as the element
|
|
we want to drag (this is to get the frame effect). We can turn it off
|
|
if we want a different behavior. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DDProxy.html#resizeFrame">DDProxy</a>.</div>
|
|
</div>
|
|
<a name="scroll"></a>
|
|
<div class="mdetail alt">
|
|
<h3>scroll</i></h3>
|
|
<code>public boolean scroll</code>
|
|
<div class="mdetail-desc">
|
|
When set to true, the utility automatically tries to scroll the browser
|
|
window wehn a drag and drop element is dragged near the viewport boundary.
|
|
Defaults to true. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DD.html#scroll">DD</a>.</div>
|
|
</div>
|
|
<a name="xTicks"></a>
|
|
<div class="mdetail">
|
|
<h3>xTicks</i></h3>
|
|
<code>public int[] xTicks</code>
|
|
<div class="mdetail-desc">
|
|
Array of pixel locations the element will snap to if we specified a
|
|
horizontal graduation/interval. This array is generated automatically
|
|
when you define a tick interval. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#xTicks">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="yTicks"></a>
|
|
<div class="mdetail alt">
|
|
<h3>yTicks</i></h3>
|
|
<code>public int[] yTicks</code>
|
|
<div class="mdetail-desc">
|
|
Array of pixel locations the element will snap to if we specified a
|
|
vertical graduation/interval. This array is generated automatically
|
|
when you define a tick interval. </div>
|
|
<div class="mdetail-def">This property is defined by <a href="Ext.dd.DragDrop.html#yTicks">DragDrop</a>.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a name="DragSource"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>DragSource</i></h3>
|
|
<code>public function DragSource(<code>String/HTMLElement/Element el</code>, <code>Object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>el</code> : String/HTMLElement/Element<div class="sub-desc">The container element</div></li><li><code>config</code> : Object<div class="sub-desc"></div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="addInvalidHandleClass"></a>
|
|
<div class="mdetail">
|
|
<h3>addInvalidHandleClass</i></h3>
|
|
<code>public function addInvalidHandleClass(<code>string cssClass</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Lets you specify a css class of elements that will not initiate a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>cssClass</code> : string<div class="sub-desc">the class of the elements you wish to ignore</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#addInvalidHandleClass">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addInvalidHandleId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addInvalidHandleId</i></h3>
|
|
<code>public function addInvalidHandleId(<code>string id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Lets you to specify an element id for a child of a drag handle
|
|
that should not initiate a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : string<div class="sub-desc">the element id of the element you wish to ignore</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#addInvalidHandleId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addInvalidHandleType"></a>
|
|
<div class="mdetail">
|
|
<h3>addInvalidHandleType</i></h3>
|
|
<code>public function addInvalidHandleType(<code>string tagName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify a tag name that should not start a drag operation
|
|
when clicked. This is designed to facilitate embedding links within a
|
|
drag handle that do something other than start the drag.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>tagName</code> : string<div class="sub-desc">the type of element to exclude</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#addInvalidHandleType">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="addToGroup"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addToGroup</i></h3>
|
|
<code>public function addToGroup(<code>sGroup {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Add this instance to a group of related drag/drop objects. All
|
|
instances belong to at least one group, and can belong to as many
|
|
groups as needed.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : sGroup<div class="sub-desc">the name of the group</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#addToGroup">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="afterDragDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>afterDragDrop</i></h3>
|
|
<code>public function afterDragDrop(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
after a valid drag drop has occurred by providing an implementation.
|
|
<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 dropped element</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="afterDragEnter"></a>
|
|
<div class="mdetail alt">
|
|
<h3>afterDragEnter</i></h3>
|
|
<code>public function afterDragEnter(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
when the dragged item enters the drop target by providing an implementation.
|
|
<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>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="afterDragOut"></a>
|
|
<div class="mdetail">
|
|
<h3>afterDragOut</i></h3>
|
|
<code>public function afterDragOut(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
after the dragged item is dragged out of the target without dropping.
|
|
<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>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="afterDragOver"></a>
|
|
<div class="mdetail alt">
|
|
<h3>afterDragOver</i></h3>
|
|
<code>public function afterDragOver(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
while the dragged item is over the drop target by providing an implementation.
|
|
<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>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="afterInvalidDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>afterInvalidDrop</i></h3>
|
|
<code>public function afterInvalidDrop(<code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
after an invalid drop has occurred by providing an implementation.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><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 dropped element</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="alignElWithMouse"></a>
|
|
<div class="mdetail alt">
|
|
<h3>alignElWithMouse</i></h3>
|
|
<code>public function alignElWithMouse(<code>HTMLElement el</code>, <code>int iPageX</code>, <code>int iPageY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the element to the location of the mousedown or click event,
|
|
maintaining the cursor location relative to the location on the element
|
|
that was clicked. Override this if you want to place the element in a
|
|
location other than where the cursor is.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>el</code> : HTMLElement<div class="sub-desc">the element to move</div></li><li><code>iPageX</code> : int<div class="sub-desc">the X coordinate of the mousedown or drag event</div></li><li><code>iPageY</code> : int<div class="sub-desc">the Y coordinate of the mousedown or drag event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DD.html#alignElWithMouse">DD</a>.</div>
|
|
</div>
|
|
<a name="applyConfig"></a>
|
|
<div class="mdetail">
|
|
<h3>applyConfig</i></h3>
|
|
<code>public function applyConfig()</code>
|
|
<div class="mdetail-desc">
|
|
Applies the configuration parameters that were passed into the constructor.
|
|
This is supposed to happen at each level through the inheritance chain. So
|
|
a DDProxy implentation will execute apply config on DDProxy, DD, and
|
|
DragDrop in order to get all of the parameters that are available in
|
|
each object.
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#applyConfig">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="autoOffset"></a>
|
|
<div class="mdetail alt">
|
|
<h3>autoOffset</i></h3>
|
|
<code>public function autoOffset(<code>int iPageX</code>, <code>int iPageY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the pointer offset to the distance between the linked element's top
|
|
left corner and the location the element was clicked
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iPageX</code> : int<div class="sub-desc">the X coordinate of the click</div></li><li><code>iPageY</code> : int<div class="sub-desc">the Y coordinate of the click</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DD.html#autoOffset">DD</a>.</div>
|
|
</div>
|
|
<a name="beforeDragDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>beforeDragDrop</i></h3>
|
|
<code>public function beforeDragDrop(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action before the dragged
|
|
item is dropped onto the target and optionally cancel the onDragDrop.
|
|
<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 drop event is valid, else false to cancel</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="beforeDragEnter"></a>
|
|
<div class="mdetail alt">
|
|
<h3>beforeDragEnter</i></h3>
|
|
<code>public function beforeDragEnter(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="beforeDragOut"></a>
|
|
<div class="mdetail">
|
|
<h3>beforeDragOut</i></h3>
|
|
<code>public function beforeDragOut(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action before the dragged
|
|
item 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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="beforeDragOver"></a>
|
|
<div class="mdetail alt">
|
|
<h3>beforeDragOver</i></h3>
|
|
<code>public function beforeDragOver(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action
|
|
while 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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="beforeInvalidDrop"></a>
|
|
<div class="mdetail">
|
|
<h3>beforeInvalidDrop</i></h3>
|
|
<code>public function beforeInvalidDrop(<code>Ext.dd.DragDrop target</code>, <code>Event e</code>, <code>String id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action after an invalid
|
|
drop 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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="cachePosition"></a>
|
|
<div class="mdetail alt">
|
|
<h3>cachePosition</i></h3>
|
|
<code>public function cachePosition(<code>iPageX the</code>, <code>iPageY the</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Saves the most recent position so that we can reset the constraints and
|
|
tick marks on-demand. We need to know this so that we can calculate the
|
|
number 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 we don'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 we don't have to look it up again)</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DD.html#cachePosition">DD</a>.</div>
|
|
</div>
|
|
<a name="clearConstraints"></a>
|
|
<div class="mdetail">
|
|
<h3>clearConstraints</i></h3>
|
|
<code>public function clearConstraints()</code>
|
|
<div class="mdetail-desc">
|
|
Clears any constraints applied to this instance. Also clears ticks
|
|
since 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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#clearConstraints">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="clearTicks"></a>
|
|
<div class="mdetail alt">
|
|
<h3>clearTicks</i></h3>
|
|
<code>public function clearTicks()</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#clearTicks">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="createFrame"></a>
|
|
<div class="mdetail">
|
|
<h3>createFrame</i></h3>
|
|
<code>public function createFrame()</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DDProxy.html#createFrame">DDProxy</a>.</div>
|
|
</div>
|
|
<a name="endDrag"></a>
|
|
<div class="mdetail alt">
|
|
<h3>endDrag</i></h3>
|
|
<code>public function endDrag(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#endDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getDragData"></a>
|
|
<div class="mdetail">
|
|
<h3>getDragData</i></h3>
|
|
<code>public function getDragData()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the data object associated with this drag source
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">data An object containing arbitrary data</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="getDragEl"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getDragEl</i></h3>
|
|
<code>public function getDragEl()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a reference to the actual element to drag. By default this is
|
|
the same as the html element, but it can be assigned to another
|
|
element. 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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#getDragEl">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getEl"></a>
|
|
<div class="mdetail">
|
|
<h3>getEl</i></h3>
|
|
<code>public function getEl()</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#getEl">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="getProxy"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getProxy</i></h3>
|
|
<code>public function getProxy()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the drag source's underlying <a href="Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a>
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.dd.StatusProxy</code><div class="sub-desc">proxy The StatusProxy</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="hideProxy"></a>
|
|
<div class="mdetail">
|
|
<h3>hideProxy</i></h3>
|
|
<code>public function hideProxy()</code>
|
|
<div class="mdetail-desc">
|
|
Hides the drag source's <a href="Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a>
|
|
<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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="init"></a>
|
|
<div class="mdetail alt">
|
|
<h3>init</i></h3>
|
|
<code>public function init(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets up the DragDrop object. Must be called in the constructor of any
|
|
Ext.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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#init">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="initFrame"></a>
|
|
<div class="mdetail">
|
|
<h3>initFrame</i></h3>
|
|
<code>public function initFrame()</code>
|
|
<div class="mdetail-desc">
|
|
Initialization for the drag frame element. Must be called in the
|
|
constructor of all subclasses
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DDProxy.html#initFrame">DDProxy</a>.</div>
|
|
</div>
|
|
<a name="initTarget"></a>
|
|
<div class="mdetail alt">
|
|
<h3>initTarget</i></h3>
|
|
<code>public function initTarget(<code>id the</code>, <code>String sGroup</code>, <code>object config</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Initializes Targeting functionality only... the object does not
|
|
get 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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#initTarget">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isLocked"></a>
|
|
<div class="mdetail">
|
|
<h3>isLocked</i></h3>
|
|
<code>public function isLocked()</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#isLocked">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isTarget"></a>
|
|
<div class="mdetail alt">
|
|
<h3>isTarget</i></h3>
|
|
<code>public function isTarget()</code>
|
|
<div class="mdetail-desc">
|
|
By default, all insances can be a drop target. This can be disabled by
|
|
setting isTarget to false.
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#isTarget">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="isValidHandleChild"></a>
|
|
<div class="mdetail">
|
|
<h3>isValidHandleChild</i></h3>
|
|
<code>public function isValidHandleChild(<code>HTMLElement node</code>)</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#isValidHandleChild">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="lock"></a>
|
|
<div class="mdetail alt">
|
|
<h3>lock</i></h3>
|
|
<code>public function lock()</code>
|
|
<div class="mdetail-desc">
|
|
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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#lock">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onAvailable"></a>
|
|
<div class="mdetail">
|
|
<h3>onAvailable</i></h3>
|
|
<code>public function onAvailable()</code>
|
|
<div class="mdetail-desc">
|
|
Override the onAvailable method to do what is needed after the initial
|
|
position was determined.
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onAvailable">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onBeforeDrag"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onBeforeDrag</i></h3>
|
|
<code>public function onBeforeDrag(<code>Object data</code>, <code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
An empty function by default, but provided so that you can perform a custom action before the initial
|
|
drag event begins and optionally cancel it.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>data</code> : Object<div class="sub-desc">An object containing arbitrary data to be shared with drop targets</div></li><li><code>e</code> : Event<div class="sub-desc">The event object</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 class="mdetail-def">This method is defined by DragSource.</div>
|
|
</div>
|
|
<a name="onDrag"></a>
|
|
<div class="mdetail">
|
|
<h3>onDrag</i></h3>
|
|
<code>public function onDrag(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called during the onMouseMove event while dragging an
|
|
object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragDrop"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onDragDrop</i></h3>
|
|
<code>public function onDragDrop(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this item is dropped on another DragDrop
|
|
obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mouseup event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this was dropped on. In INTERSECT mode, an array of dd items this was dropped on.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onDragDrop">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragEnter"></a>
|
|
<div class="mdetail">
|
|
<h3>onDragEnter</i></h3>
|
|
<code>public function onDragEnter(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this element fist begins hovering over
|
|
another DragDrop obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this is hovering over. In INTERSECT mode, an array of one or more dragdrop items being hovered over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onDragEnter">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragOut"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onDragOut</i></h3>
|
|
<code>public function onDragOut(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when we are no longer hovering over an element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this was hovering over. In INTERSECT mode, an array of dd items that the mouse is no longer over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onDragOut">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onDragOver"></a>
|
|
<div class="mdetail">
|
|
<h3>onDragOver</i></h3>
|
|
<code>public function onDragOver(<code>Event e</code>, <code>String|DragDrop[] id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this element is hovering over another
|
|
DragDrop obj
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousemove event</div></li><li><code>id</code> : String|DragDrop[]<div class="sub-desc">In POINT mode, the element id this is hovering over. In INTERSECT mode, an array of dd items being hovered over.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onDragOver">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onInvalidDrop"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onInvalidDrop</i></h3>
|
|
<code>public function onInvalidDrop(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called when this item is dropped on an area with no
|
|
drop target
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onInvalidDrop">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onMouseDown"></a>
|
|
<div class="mdetail">
|
|
<h3>onMouseDown</i></h3>
|
|
<code>public function onMouseDown(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Event handler that fires when a drag/drop obj gets a mousedown
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>e</code> : Event<div class="sub-desc">the mousedown event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onMouseDown">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="onMouseUp"></a>
|
|
<div class="mdetail alt">
|
|
<h3>onMouseUp</i></h3>
|
|
<code>public function onMouseUp(<code>Event e</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Event handler that fires when a drag/drop obj gets a mouseup
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#onMouseUp">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="padding"></a>
|
|
<div class="mdetail">
|
|
<h3>padding</i></h3>
|
|
<code>public function padding()</code>
|
|
<div class="mdetail-desc">
|
|
The padding configured for this drag and drop object for calculating
|
|
the drop zone intersection with this object.
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#padding">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeFromGroup"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeFromGroup</i></h3>
|
|
<code>public function removeFromGroup(<code>string sGroup</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Remove's this instance from the supplied interaction group
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>sGroup</code> : string<div class="sub-desc">The group to drop</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#removeFromGroup">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleClass"></a>
|
|
<div class="mdetail">
|
|
<h3>removeInvalidHandleClass</i></h3>
|
|
<code>public function removeInvalidHandleClass(<code>string cssClass</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an invalid css class
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>cssClass</code> : string<div class="sub-desc">the class of the element(s) you wish to re-enable</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#removeInvalidHandleClass">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeInvalidHandleId</i></h3>
|
|
<code>public function removeInvalidHandleId(<code>string id</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an invalid handle id
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>id</code> : string<div class="sub-desc">the id of the element to re-enable</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#removeInvalidHandleId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="removeInvalidHandleType"></a>
|
|
<div class="mdetail">
|
|
<h3>removeInvalidHandleType</i></h3>
|
|
<code>public function removeInvalidHandleType(<code>string tagName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsets an excluded tag name set by addInvalidHandleType
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>tagName</code> : string<div class="sub-desc">the type of element to unexclude</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#removeInvalidHandleType">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="resetConstraints"></a>
|
|
<div class="mdetail alt">
|
|
<h3>resetConstraints</i></h3>
|
|
<code>public function resetConstraints(<code>boolean maintainOffset</code>)</code>
|
|
<div class="mdetail-desc">
|
|
resetConstraints must be called if you manually reposition a dd element.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>maintainOffset</code> : boolean<div class="sub-desc"></div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#resetConstraints">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setDelta"></a>
|
|
<div class="mdetail">
|
|
<h3>setDelta</i></h3>
|
|
<code>public function setDelta(<code>int iDeltaX</code>, <code>int iDeltaY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the pointer offset. You can call this directly to force the
|
|
offset to be in a particular location (e.g., pass in 0,0 to set it
|
|
to the center of the object)
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iDeltaX</code> : int<div class="sub-desc">the distance from the left</div></li><li><code>iDeltaY</code> : int<div class="sub-desc">the distance from the top</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DD.html#setDelta">DD</a>.</div>
|
|
</div>
|
|
<a name="setDragElId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setDragElId</i></h3>
|
|
<code>public function setDragElId(<code>id {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify that an element other than the linked element
|
|
will be moved with the cursor during a drag
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : id<div class="sub-desc">the id of the element that will be used to initiate the drag</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setDragElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setDragElPos"></a>
|
|
<div class="mdetail">
|
|
<h3>setDragElPos</i></h3>
|
|
<code>public function setDragElPos(<code>int iPageX</code>, <code>int iPageY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the drag element to the location of the mousedown or click event,
|
|
maintaining the cursor location relative to the location on the element
|
|
that was clicked. Override this if you want to place the element in a
|
|
location other than where the cursor is.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iPageX</code> : int<div class="sub-desc">the X coordinate of the mousedown or drag event</div></li><li><code>iPageY</code> : int<div class="sub-desc">the Y coordinate of the mousedown or drag event</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DD.html#setDragElPos">DD</a>.</div>
|
|
</div>
|
|
<a name="setHandleElId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setHandleElId</i></h3>
|
|
<code>public function setHandleElId(<code>id {string}</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to specify a child of the linked element that should be
|
|
used to initiate the drag operation. An example of this would be if
|
|
you have a content div with text and links. Clicking anywhere in the
|
|
content area would normally start the drag operation. Use this method
|
|
to specify that an element inside of the content div is the element
|
|
that starts the drag operation.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{string}</code> : id<div class="sub-desc">the id of the element that will be used to initiate the drag.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setHandleElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setInitialPosition"></a>
|
|
<div class="mdetail">
|
|
<h3>setInitialPosition</i></h3>
|
|
<code>public function setInitialPosition(<code>int diffX</code>, <code>int diffY</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Stores the initial placement of the linked element.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>diffX</code> : int<div class="sub-desc">the X offset, default 0</div></li><li><code>diffY</code> : int<div class="sub-desc">the Y offset, default 0</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setInitialPosition">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setOuterHandleElId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setOuterHandleElId</i></h3>
|
|
<code>public function setOuterHandleElId(<code>id the</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Allows you to set an element outside of the linked element as a drag
|
|
handle
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>the</code> : id<div class="sub-desc">id of the element that will be used to initiate the drag</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setOuterHandleElId">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setPadding"></a>
|
|
<div class="mdetail">
|
|
<h3>setPadding</i></h3>
|
|
<code>public function setPadding(<code>int iTop</code>, <code>int iRight</code>, <code>int iBot</code>, <code>int iLeft</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Configures the padding for the target zone in px. Effectively expands
|
|
(or reduces) the virtual object size for targeting calculations.
|
|
Supports css-style shorthand; if only one parameter is passed, all sides
|
|
will have that padding, and if only two are passed, the top and bottom
|
|
will have the first param, the left and right the second.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iTop</code> : int<div class="sub-desc">Top pad</div></li><li><code>iRight</code> : int<div class="sub-desc">Right pad</div></li><li><code>iBot</code> : int<div class="sub-desc">Bot pad</div></li><li><code>iLeft</code> : int<div class="sub-desc">Left pad</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setPadding">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setXConstraint"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setXConstraint</i></h3>
|
|
<code>public function setXConstraint(<code>int iLeft</code>, <code>int iRight</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
By default, the element can be dragged any place on the screen. Use
|
|
this method to limit the horizontal travel of the element. Pass in
|
|
0,0 for the parameters if you want to lock the drag to the y axis.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iLeft</code> : int<div class="sub-desc">the number of pixels the element can move to the left</div></li><li><code>iRight</code> : int<div class="sub-desc">the number of pixels the element can move to the right</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move iTickSize pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setXConstraint">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="setYConstraint"></a>
|
|
<div class="mdetail">
|
|
<h3>setYConstraint</i></h3>
|
|
<code>public function setYConstraint(<code>int iUp</code>, <code>int iDown</code>, <code>int iTickSize</code>)</code>
|
|
<div class="mdetail-desc">
|
|
By default, the element can be dragged any place on the screen. Set
|
|
this to limit the vertical travel of the element. Pass in 0,0 for the
|
|
parameters if you want to lock the drag to the x axis.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>iUp</code> : int<div class="sub-desc">the number of pixels the element can move up</div></li><li><code>iDown</code> : int<div class="sub-desc">the number of pixels the element can move down</div></li><li><code>iTickSize</code> : int<div class="sub-desc">optional parameter for specifying that the element should move iTickSize pixels at a time.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#setYConstraint">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="startDrag"></a>
|
|
<div class="mdetail alt">
|
|
<h3>startDrag</i></h3>
|
|
<code>public function startDrag(<code>int X</code>, <code>int Y</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Abstract method called after a drag/drop object is clicked
|
|
and the drag or mousedown time thresholds have beeen met.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>X</code> : int<div class="sub-desc">click location</div></li><li><code>Y</code> : int<div class="sub-desc">click location</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#startDrag">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="toString"></a>
|
|
<div class="mdetail">
|
|
<h3>toString</i></h3>
|
|
<code>public function toString()</code>
|
|
<div class="mdetail-desc">
|
|
toString method
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>string</code><div class="sub-desc">string representation of the dd obj</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#toString">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="unlock"></a>
|
|
<div class="mdetail alt">
|
|
<h3>unlock</i></h3>
|
|
<code>public function unlock()</code>
|
|
<div class="mdetail-desc">
|
|
Unlock this instace
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#unlock">DragDrop</a>.</div>
|
|
</div>
|
|
<a name="unreg"></a>
|
|
<div class="mdetail">
|
|
<h3>unreg</i></h3>
|
|
<code>public function unreg()</code>
|
|
<div class="mdetail-desc">
|
|
Remove all drag and drop hooks for this element
|
|
<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 class="mdetail-def">This method is defined by <a href="Ext.dd.DragDrop.html#unreg">DragDrop</a>.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Config Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="config-dropAllowed"></a>
|
|
<div class="mdetail">
|
|
<h3>dropAllowed</i></h3>
|
|
<code>dropAllowed : String</code>
|
|
<div class="mdetail-desc">
|
|
The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). </div>
|
|
<div class="mdetail-def">This config option is defined by DragSource.</div>
|
|
</div>
|
|
<a name="config-dropNotAllowed"></a>
|
|
<div class="mdetail alt">
|
|
<h3>dropNotAllowed</i></h3>
|
|
<code>dropNotAllowed : String</code>
|
|
<div class="mdetail-desc">
|
|
The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). </div>
|
|
<div class="mdetail-def">This config option is defined by DragSource.</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<hr>
|
|
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
|
|
</body>
|
|
</html> |