fixed the resizable text area with IE problem fixed the ad space with IE problem merged the 7.2.0 and 7.1.4 change logs
1871 lines
45 KiB
HTML
1871 lines
45 KiB
HTML
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>JavaScript Documentation - </title>
|
|
|
|
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="header">
|
|
|
|
<h1>JavaScript Documentation</h1>
|
|
|
|
<h3><a href="./index.html">Drag and Drop</a></h3>
|
|
|
|
|
|
|
|
<div class="breadcrumbs">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="./index.html">Drag and Drop</a>
|
|
|
|
>
|
|
|
|
<strong>YAHOO.util.DragDropMgr</strong>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="body">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="nav">
|
|
|
|
<div class="module resources">
|
|
|
|
<ul class="content">
|
|
|
|
<li><a href="overview-tree.html">Tree View</a></li>
|
|
|
|
<li><a href="index-all.html">Element Index</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="module">
|
|
|
|
<h4><a href="./allclasses-noframe.html">Classes</a></h4>
|
|
|
|
<ul class="content">
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.html">
|
|
|
|
YAHOO.util</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.DD.html">
|
|
|
|
YAHOO.util.DD</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.DDProxy.html">
|
|
|
|
YAHOO.util.DDProxy</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.DDTarget.html">
|
|
|
|
YAHOO.util.DDTarget</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.DragDrop.html">
|
|
|
|
YAHOO.util.DragDrop</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="YAHOO.util.DragDropMgr.html">
|
|
|
|
YAHOO.util.DragDropMgr</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="module">
|
|
|
|
<h4><a href="./overview-summary.html">Files</a></h4>
|
|
|
|
<ul class="content">
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="overview-summary-DD.js.html">
|
|
|
|
DD.js</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="overview-summary-DDProxy.js.html">
|
|
|
|
DDProxy.js</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="overview-summary-DDTarget.js.html">
|
|
|
|
DDTarget.js</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="overview-summary-DragDrop.js.html">
|
|
|
|
DragDrop.js</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="overview-summary-DragDropMgr.js.html">
|
|
|
|
DragDropMgr.js</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="pri">
|
|
|
|
<div class="main">
|
|
|
|
|
|
|
|
<h2>Class YAHOO.util.DragDropMgr</h2>
|
|
|
|
<pre>Object
|
|
|
|
|
+--<b>YAHOO.util.DragDropMgr</b>
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<!-- Class definition -->
|
|
|
|
<div class="class-def">
|
|
|
|
<div class="class-name">
|
|
|
|
<span class="class-attribs">
|
|
|
|
|
|
|
|
</span>
|
|
|
|
<span class="class-type">class</span>
|
|
|
|
<b>YAHOO.util.DragDropMgr</b>
|
|
|
|
</div>
|
|
|
|
<div class="class-extends">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ======== QUICK LINKS ======== -->
|
|
|
|
<div class="quick-links">
|
|
|
|
<strong>Quick Links:</strong>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="#field_summary">Field Summary</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="#methodSummary">Method Summary</a> |
|
|
|
|
<a href="#methodDetails">Method Details</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- ======== END QUICK LINKS ======== -->
|
|
|
|
|
|
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
|
|
|
|
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
|
|
|
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
|
|
|
<div class="section field summaries">
|
|
|
|
<h3><a name="field_summary">Field Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
|
|
<div class="content">
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#clickPixelThresh">clickPixelThresh</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The number of pixels that the mouse needs to move after the
|
|
mousedown before the drag is initiated.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#clickTimeThresh">clickTimeThresh</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The number of milliseconds after the mousedown event to initiate the
|
|
drag if we don't get a mouseup event.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#INTERSECT">INTERSECT</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
In intersect mode, drag and drop interactio nis defined by the
|
|
overlap of two or more drag and drop objects.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#locked">locked</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Is drag and drop locked?
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#mode">mode</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The current drag and drop mode.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#POINT">POINT</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
In point mode, drag and drop interaction is defined by the
|
|
location of the cursor during the drag/drop
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#preventDefault">preventDefault</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Flag to determine if we should prevent the default behavior of the
|
|
events we define.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#stopPropagation">stopPropagation</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Flag to determine if we should stop the propagation of the events
|
|
we generate.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#useCache">useCache</a>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Set useCache to false if you want to force object the lookup of each
|
|
drag and drop linked element constantly during a drag.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========== END FIELD SUMMARY =========== -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
|
|
|
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
|
|
|
|
<div class="section method summaries">
|
|
|
|
<h3><a name="methodSummary">Method Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
|
|
<div class="content">
|
|
|
|
<table border="1" cellpadding="3" cellspacing="0">
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">ygDragDrop</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getBestMatch">getBestMatch</a>
|
|
|
|
(dds)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Helper function for getting the best match from the list of drag
|
|
and drop objects returned by the drag and drop events when we are
|
|
in INTERSECT mode.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getClientHeight">getClientHeight</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Gets the client height
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getClientWidth">getClientWidth</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Gets the client width
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getCss">getCss</a>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the style property for the DOM element (i.e.,
|
|
document.getElById(id).style)
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">DragDrop</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getDDById">getDDById</a>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the DragDrop instance for a given id
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getElement">getElement</a>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the actual DOM element
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getLocation">getLocation</a>
|
|
|
|
(<ygDragDrop> oDD)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the an array containing the drag and drop element's position
|
|
and size, including the ygDragDrop.padding configured for it
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getPosX">getPosX</a>
|
|
|
|
(el)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the X position of an html element
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getPosY">getPosY</a>
|
|
|
|
(el)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the Y position of an html element
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getRelated">getRelated</a>
|
|
|
|
(<ygDragDrop> p_oDD, <boolean> bTargetsOnly)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the drag and drop instances that are in all groups the
|
|
passed in instance belongs to.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getScrollLeft">getScrollLeft</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Gets the scrollLeft
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">int</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getScrollTop">getScrollTop</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Gets the scrollTop
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">string</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#getStyle">getStyle</a>
|
|
|
|
(<HTMLElement> el, <string> styleProp)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns the specified element style property
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#handleWasClicked">handleWasClicked</a>
|
|
|
|
(node, id)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Recursively searches the immediate parent and all child nodes for
|
|
the handle element in order to determine wheter or not it was
|
|
clicked.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#isDragDrop">isDragDrop</a>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Utility function to determine if a given element has been
|
|
registered as a drag drop item.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#isHandle">isHandle</a>
|
|
|
|
(sDDId, sHandleId)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Utility function to determine if a given element has been
|
|
registered as a drag drop handle for the given Drag Drop object.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#isLegalTarget">isLegalTarget</a>
|
|
|
|
(oDD, oTargetDD)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Returns true if the specified dd target is a legal target for
|
|
the specifice drag obj
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#isLocked">isLocked</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Is drag and drop locked?
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#isTypeOfDD">isTypeOfDD</a>
|
|
|
|
(oDD)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
My goal is to be able to transparently determine if an object is
|
|
typeof ygDragDrop, and the exact subclass of ygDragDrop.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#lock">lock</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Lock all drag and drop functionality
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#moveToEl">moveToEl</a>
|
|
|
|
(moveEl, targetEl)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">Object</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#numericSort">numericSort</a>
|
|
|
|
(a, b)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
numeric array sort function
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#refreshCache">refreshCache</a>
|
|
|
|
(<Array> aGroups)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Refreshes the cache of the top-left and bottom-right points of the
|
|
drag and drop objects in the specified groups
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#regDragDrop">regDragDrop</a>
|
|
|
|
(<DragDrop> oDD, <String> sGroup)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Each DragDrop instance must be registered with the DragDropMgr.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#regHandle">regHandle</a>
|
|
|
|
(<String> sDDId, <String> sHandleId)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Each DragDrop handle element must be registered.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#startDrag">startDrag</a>
|
|
|
|
(x, y)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Fired when either the drag pixel threshol or the mousedown hold
|
|
time threshold has been met.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#stopEvent">stopEvent</a>
|
|
|
|
(<Event> e)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Utility to stop event propagation and event default, if these
|
|
features are turned on.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#swapNode">swapNode</a>
|
|
|
|
(n1, n2)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Swap two nodes.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">void</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#unlock">unlock</a>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Unlock all drag and drop functionality
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="flags">boolean</td>
|
|
|
|
<td class="spec">
|
|
|
|
<code>
|
|
|
|
<a href="#verifyEl">verifyEl</a>
|
|
|
|
(<HTMLElement> el)
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
This checks to make sure an element exists and is in the DOM.
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ========== END METHOD SUMMARY =========== -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ============ FIELD DETAIL START =========== -->
|
|
|
|
|
|
|
|
<div class="section field details">
|
|
|
|
<h3><a name="field_detail">Field Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<h4><a name="clickPixelThresh">clickPixelThresh</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
|
|
|
|
<strong>clickPixelThresh</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The number of pixels that the mouse needs to move after the
|
|
mousedown before the drag is initiated. Default=3;
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="clickTimeThresh">clickTimeThresh</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
|
|
|
|
<strong>clickTimeThresh</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The number of milliseconds after the mousedown event to initiate the
|
|
drag if we don't get a mouseup event. Default=1000
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="INTERSECT">INTERSECT</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
|
|
|
|
<strong>INTERSECT</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
In intersect mode, drag and drop interactio nis defined by the
|
|
overlap of two or more drag and drop objects.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="locked">locked</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
|
|
|
|
<strong>locked</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Is drag and drop locked?
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="mode">mode</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
|
|
|
|
<strong>mode</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
The current drag and drop mode. Default it point mode
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="POINT">POINT</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
|
|
|
|
<strong>POINT</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
In point mode, drag and drop interaction is defined by the
|
|
location of the cursor during the drag/drop
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="preventDefault">preventDefault</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
|
|
|
|
<strong>preventDefault</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Flag to determine if we should prevent the default behavior of the
|
|
events we define. By default this is true, but this can be set to
|
|
false if you need the default behavior (not recommended)
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="stopPropagation">stopPropagation</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
|
|
|
|
<strong>stopPropagation</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Flag to determine if we should stop the propagation of the events
|
|
we generate. This is true by default but you may want to set it to
|
|
false if the html element contains other features that require the
|
|
mouse click.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="useCache">useCache</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
|
|
|
|
<strong>useCache</strong>
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
Set useCache to false if you want to force object the lookup of each
|
|
drag and drop linked element constantly during a drag.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ============ FIELD DETAIL END =========== -->
|
|
|
|
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
|
|
|
|
|
|
|
<div class="section constructor details">
|
|
|
|
<h3><a name="constructor_detail">Constructor Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
|
|
<div class="content">
|
|
|
|
<h4><a name="YAHOO.util.DragDropMgr()">YAHOO.util.DragDropMgr</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
<strong>YAHOO.util.DragDropMgr</strong>
|
|
|
|
|
|
|
|
</code>
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ============ METHOD DETAIL START ========== -->
|
|
|
|
|
|
|
|
<div class="section method details">
|
|
|
|
<h3><a name="methodDetails">Method Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<h4><a name="getBestMatch">getBestMatch</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
ygDragDrop
|
|
|
|
<strong>getBestMatch</strong>
|
|
|
|
(dds)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Helper function for getting the best match from the list of drag
|
|
and drop objects returned by the drag and drop events when we are
|
|
in INTERSECT mode. It returns either the first object that the
|
|
cursor is over, or the object that has the greatest overlap with
|
|
the dragged element.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>ygDragDrop</code> -
|
|
|
|
[]} dds The array of drag and drop objects targeted
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> The best single match</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getClientHeight">getClientHeight</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getClientHeight</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Gets the client height
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> client height in px</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getClientWidth">getClientWidth</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getClientWidth</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Gets the client width
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> client width in px</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getCss">getCss</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>getCss</strong>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the style property for the DOM element (i.e.,
|
|
document.getElById(id).style)
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>id</code> -
|
|
|
|
the id of the elment to get
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> The style property of the element</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getDDById">getDDById</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
DragDrop
|
|
|
|
<strong>getDDById</strong>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the DragDrop instance for a given id
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>id</code> -
|
|
|
|
the id of the DragDrop object
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> the drag drop object, null if it is not found</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getElement">getElement</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>getElement</strong>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the actual DOM element
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>id</code> -
|
|
|
|
the id of the elment to get
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> The element</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getLocation">getLocation</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>getLocation</strong>
|
|
|
|
(<ygDragDrop> oDD)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the an array containing the drag and drop element's position
|
|
and size, including the ygDragDrop.padding configured for it
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>oDD</code> -
|
|
|
|
the drag and drop object to get the location for
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd>array containing the top left and bottom right points of the element</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getPosX">getPosX</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getPosX</strong>
|
|
|
|
(el)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the X position of an html element
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>el</code> -
|
|
|
|
the element for which to get the position
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> the X coordinate</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getPosY">getPosY</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getPosY</strong>
|
|
|
|
(el)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the Y position of an html element
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>el</code> -
|
|
|
|
the element for which to get the position
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> the Y coordinate</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getRelated">getRelated</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>getRelated</strong>
|
|
|
|
(<ygDragDrop> p_oDD, <boolean> bTargetsOnly)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the drag and drop instances that are in all groups the
|
|
passed in instance belongs to.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>p_oDD</code> -
|
|
|
|
the obj to get related data for
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>bTargetsOnly</code> -
|
|
|
|
if true, only return targetable objs
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd>{ygDragDrop[]} the related instances</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getScrollLeft">getScrollLeft</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getScrollLeft</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Gets the scrollLeft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> the document's scrollTop</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getScrollTop">getScrollTop</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
int
|
|
|
|
<strong>getScrollTop</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Gets the scrollTop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> the document's scrollTop</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="getStyle">getStyle</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
string
|
|
|
|
<strong>getStyle</strong>
|
|
|
|
(<HTMLElement> el, <string> styleProp)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns the specified element style property
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>el</code> -
|
|
|
|
the element
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>styleProp</code> -
|
|
|
|
the style property
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> The value of the style property </dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
, use YAHOO.util.Dom.getStyle
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="handleWasClicked">handleWasClicked</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>handleWasClicked</strong>
|
|
|
|
(node, id)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Recursively searches the immediate parent and all child nodes for
|
|
the handle element in order to determine wheter or not it was
|
|
clicked.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>node</code> -
|
|
|
|
the html element to inspect
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="isDragDrop">isDragDrop</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>isDragDrop</strong>
|
|
|
|
(<String> id)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Utility function to determine if a given element has been
|
|
registered as a drag drop item.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>id</code> -
|
|
|
|
the element id to check
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> true if this element is a DragDrop item, false otherwise</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="isHandle">isHandle</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>isHandle</strong>
|
|
|
|
(sDDId, sHandleId)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Utility function to determine if a given element has been
|
|
registered as a drag drop handle for the given Drag Drop object.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>id</code> -
|
|
|
|
the element id to check
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> true if this element is a DragDrop handle, false otherwise</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="isLegalTarget">isLegalTarget</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>isLegalTarget</strong>
|
|
|
|
(oDD, oTargetDD)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Returns true if the specified dd target is a legal target for
|
|
the specifice drag obj
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>the</code> -
|
|
|
|
drag obj
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>ygDragDrop</code> -
|
|
|
|
) the target
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> true if the target is a legal target for the dd obj</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="isLocked">isLocked</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>isLocked</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Is drag and drop locked?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> True if drag and drop is locked, false otherwise.</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="isTypeOfDD">isTypeOfDD</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>isTypeOfDD</strong>
|
|
|
|
(oDD)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
My goal is to be able to transparently determine if an object is
|
|
typeof ygDragDrop, and the exact subclass of ygDragDrop. typeof
|
|
returns "object", oDD.constructor.toString() always returns
|
|
"ygDragDrop" and not the name of the subclass. So for now it just
|
|
evaluates a well-known variable in ygDragDrop.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>the</code> -
|
|
|
|
object to evaluate
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> true if typeof oDD = ygDragDrop</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="lock">lock</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>lock</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Lock all drag and drop functionality
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="moveToEl">moveToEl</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>moveToEl</strong>
|
|
|
|
(moveEl, targetEl)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="numericSort">numericSort</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
Object
|
|
|
|
<strong>numericSort</strong>
|
|
|
|
(a, b)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
numeric array sort function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="refreshCache">refreshCache</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>refreshCache</strong>
|
|
|
|
(<Array> aGroups)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Refreshes the cache of the top-left and bottom-right points of the
|
|
drag and drop objects in the specified groups
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>aGroups</code> -
|
|
|
|
an associative array of groups to refresh
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="regDragDrop">regDragDrop</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>regDragDrop</strong>
|
|
|
|
(<DragDrop> oDD, <String> sGroup)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Each DragDrop instance must be registered with the DragDropMgr.
|
|
This is executed in ygDragDrop.init()
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>oDD</code> -
|
|
|
|
the DragDrop object to register
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>sGroup</code> -
|
|
|
|
the name of the group this element belongs to
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="regHandle">regHandle</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>regHandle</strong>
|
|
|
|
(<String> sDDId, <String> sHandleId)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Each DragDrop handle element must be registered. This is done
|
|
automatically when executing ygDragDrop.setHandleElId()
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>sDDId</code> -
|
|
|
|
the DragDrop id this element is a handle for
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>sHandleId</code> -
|
|
|
|
the id of the element that is the drag handle
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="startDrag">startDrag</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>startDrag</strong>
|
|
|
|
(x, y)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Fired when either the drag pixel threshol or the mousedown hold
|
|
time threshold has been met.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>x</code> -
|
|
|
|
{int} the X position of the original mousedown
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>y</code> -
|
|
|
|
{int} the Y position of the original mousedown
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="stopEvent">stopEvent</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>stopEvent</strong>
|
|
|
|
(<Event> e)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Utility to stop event propagation and event default, if these
|
|
features are turned on.
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>e</code> -
|
|
|
|
the event as returned by YAHOO.util.DragDropMgr.prototype.getEvent()
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="swapNode">swapNode</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>swapNode</strong>
|
|
|
|
(n1, n2)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Swap two nodes. In IE, we use the native method, for others we
|
|
emulate the IE behavior
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>n1</code> -
|
|
|
|
the first node to swap
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>n2</code> -
|
|
|
|
the other node to swap
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="unlock">unlock</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
void
|
|
|
|
<strong>unlock</strong>
|
|
|
|
()
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
Unlock all drag and drop functionality
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
<h4><a name="verifyEl">verifyEl</a></h4>
|
|
|
|
<div class="detail">
|
|
|
|
<code>
|
|
|
|
boolean
|
|
|
|
<strong>verifyEl</strong>
|
|
|
|
(<HTMLElement> el)
|
|
|
|
</code>
|
|
|
|
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
This checks to make sure an element exists and is in the DOM. The
|
|
main purpose is to handle cases where innerHTML is used to remove
|
|
drag and drop objects from the DOM. IE provides an 'unspecified
|
|
error' when trying to access the offsetParent of such an element
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Parameters:</dt>
|
|
|
|
|
|
|
|
<dd>
|
|
|
|
<code>el</code> -
|
|
|
|
the element to check
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>Returns:</dt>
|
|
|
|
<dd> true if the element looks usable</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ============ METHOD DETAIL END ========== -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
|
|
|
|
|
|
|
|
|
|
<div id="footer">
|
|
|
|
<hr />
|
|
|
|
Copyright © 2004 - 2006 Yahoo! Inc. All rights reserved.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|