dd-plugin.js.html revision 4fcbec6145d16637205990699912fb90f6a3807c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>API: dd-plugin dd-plugin.js (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/api.css">
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
<h3>dd-plugin&nbsp; <span class="subtitle">3.00PR1</span></h3>
<p>
<a href="/index.html">Yahoo! UI Library</a>
&gt; <a href="/module_dd-plugin.html">dd-plugin</a>
&gt; dd-plugin.js (source view)
</p>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form name="yui-classopts-form">
<span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> <label for="showprivate">Show Private</label></span>
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> <label for="showprotected">Show Protected</label></span>
<span id="classopts"><input type="checkbox" name="showdeprecated" id="showdeprecated" /> <label for="showdeprecated">Show Deprecated</label></span>
</form>
<div id="srcout">
<style>
#doc3 #classopts { display:none; }
</style>
<div class="highlight" ><pre> <span class="c">/**</span>
<span class="c"> * This is a simple Drag plugin that can be attached to a Node via the plug method.</span>
<span class="c"> * @module dd-plugin</span>
<span class="c"> * @submodule dd-plugin</span>
<span class="c"> */</span>
<span class="c">/**</span>
<span class="c"> * This is a simple Drag plugin that can be attached to a Node via the plug method.</span>
<span class="c"> * @class DragPlugin</span>
<span class="c"> * @extends Drag</span>
<span class="c"> * @constructor</span>
<span class="c"> */</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">Plugin</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Plugin</span> <span class="o">||</span> <span class="o">{};</span>
<span class="k">var</span> <span class="nx">Drag</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">config</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">config</span><span class="o">.</span><span class="nx">node</span> <span class="o">=</span> <span class="nx">config</span><span class="o">.</span><span class="nx">owner</span><span class="o">;</span>
<span class="nx">Drag</span><span class="o">.</span><span class="nx">superclass</span><span class="o">.</span><span class="nx">constructor</span><span class="o">.</span><span class="nx">apply</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="nx">arguments</span><span class="o">);</span>
<span class="o">};</span>
<span class="c">/**</span>
<span class="c"> * @property NAME</span>
<span class="c"> * @description dd-plugin</span>
<span class="c"> * @type {String}</span>
<span class="c"> */</span>
<span class="nx">Drag</span><span class="o">.</span><span class="nx">NAME</span> <span class="o">=</span> <span class="s2">&quot;dd-plugin&quot;</span><span class="o">;</span>
<span class="c">/**</span>
<span class="c"> * @property NS</span>
<span class="c"> * @description The Drag instance will be placed on the Node instance under the dd namespace. It can be accessed via Node.dd;</span>
<span class="c"> * @type {String}</span>
<span class="c"> */</span>
<span class="nx">Drag</span><span class="o">.</span><span class="nx">NS</span> <span class="o">=</span> <span class="s2">&quot;dd&quot;</span><span class="o">;</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">extend</span><span class="o">(</span><span class="nx">Drag</span><span class="o">,</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">DD</span><span class="o">.</span><span class="nx">Drag</span><span class="o">);</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">Plugin</span><span class="o">.</span><span class="nx">Drag</span> <span class="o">=</span> <span class="nx">Drag</span><span class="o">;</span>
</pre></div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_anim.html">anim</a></li>
<li class=""><a href="module_attribute.html">attribute</a></li>
<li class=""><a href="module_base.html">base</a></li>
<li class=""><a href="module_dd.html">dd</a></li>
<li class="selected"><a href="module_dd-plugin.html">dd-plugin</a></li>
<li class=""><a href="module_dump.html">dump</a></li>
<li class=""><a href="module_event.html">event</a></li>
<li class=""><a href="module_io.html">io</a></li>
<li class=""><a href="module_node.html">node</a></li>
<li class=""><a href="module_oop.html">oop</a></li>
<li class=""><a href="module_queue.html">queue</a></li>
<li class=""><a href="module_substitute.html">substitute</a></li>
<li class=""><a href="module_yui.html">yui</a></li>
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="DragPlugin.html">DragPlugin</a></li>
<li class=""><a href="DropPlugin.html">DropPlugin</a></li>
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="dd-drop-plugin.js.html">dd-drop-plugin.js</a></li>
<li class="selected"><a href="dd-plugin.js.html">dd-plugin.js</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright &copy; 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>