Plugin.DragConstrained.html revision c7e9538ceb71a000df0f3f3e96ff47701945109e
<head>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h3>dd <span class="subtitle">3.0.0</span></h3>
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
Plugin for the dd-drag module to add the constraining methods to it. It supports constraining to a node or viewport. It supports tick based moves and XY axis constraints.
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<code>
(
)
</code>
<div class="description">
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
<div class="private" rel="yui:property" resource="#property__regionCache">
<h4><a name="property__regionCache" property="yui:name">_regionCache</a>
- <code>private <span property="yui:type">Object</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Store a cache of the region that we are constraining to
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_con">
<h4><a name="property_con" property="yui:name">con</a>
- <code><span property="yui:type">{String}</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The Constrained instance will be placed on the Drag instance under the con namespace.
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Properties inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4>
<div class="content" rel="yui:properties">
<code>
</code>
</div>
</div>
<div class="content" rel="yui:properties">
<code>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="private" rel="yui:method" resource="#method__cacheRegion">
<h4>
<a name="method__cacheRegion">_cacheRegion</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_cacheRegion</strong>
(
)
</code>
<div class="description" property="yui:description">
Get's the region and caches it, called from window.resize and when the cache is null
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__checkRegion">
<h4>
<a name="method__checkRegion">_checkRegion</a></h4>
<div class="detail" >
<code>
private
Array
<strong property="yui:name">_checkRegion</strong>
(
_xy
)
</code>
<div class="description" property="yui:description">
Check if xy is inside a given region, if not change to it be inside.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">_xy</span>
<<span property="yui:type">Array</span>>
</code>
<span property="yui:description"> The XY to check if it's in the current region, if it isn't inside the region, it will reset the xy array to be inside the region.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">The new XY that is inside the region</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__checkTicks">
<h4>
<a name="method__checkTicks">_checkTicks</a></h4>
<div class="detail" >
<code>
private
Array
<strong property="yui:name">_checkTicks</strong>
(
xy
,
r
)
</code>
<div class="description" property="yui:description">
This method delegates the proper helper method for tick calculations
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">xy</span>
<<span property="yui:type">Array</span>>
</code>
<span property="yui:description"> The XY coords for the Drag</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">r</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> The optional region that we are bound to.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Array
</code></dt>
<dd property="yui:returnInfo">The calced XY coords</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:method" resource="#method__handleStart">
<h4>
<a name="method__handleStart">_handleStart</a></h4>
<div class="detail" >
<code>
private
void
<strong property="yui:name">_handleStart</strong>
(
)
</code>
<div class="description" property="yui:description">
Fires on drag:start and clears the _regionCache
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_align">
<h4>
<a name="method_align">align</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">align</strong>
(
)
</code>
<div class="description" property="yui:description">
Modifies the Drag.actXY method from the after drag:align event. This is where the constraining happens.
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getRegion">
<h4>
<a name="method_getRegion">getRegion</a></h4>
<div class="detail" >
<code>
Object
<strong property="yui:name">getRegion</strong>
(
inc
)
</code>
<div class="description" property="yui:description">
Get the active region: viewport, node, custom region
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">inc</span>
<<span property="yui:type">Boolean</span>>
</code>
<span property="yui:description"> Include the node's height and width</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_inRegion">
<h4>
<a name="method_inRegion">inRegion</a></h4>
<div class="detail" >
<code>
Boolean
<strong property="yui:name">inRegion</strong>
(
xy
)
</code>
<div class="description" property="yui:description">
Checks if the XY passed or the dragNode is inside the active region.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">xy</span>
<<span property="yui:type">Array</span>>
</code>
<span property="yui:description"> Optional XY to check, if not supplied this.get('dragNode').getXY() is used.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Boolean
</code></dt>
<dd property="yui:returnInfo">True if the XY is inside the region, false otherwise.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_resetCache">
<h4>
<a name="method_resetCache">resetCache</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">resetCache</strong>
(
)
</code>
<div class="description" property="yui:description">
Reset the internal region cache.
</div>
<div class="description">
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Methods inherited from <a href="EventTarget.html" property="yui:name" title="EventTarget">EventTarget</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="EventTarget.html#method__getType" property="yui:name" title="_getType">_getType</a><span class="private">,</span>
</span>
<a class="private" href="EventTarget.html#method__parseType" property="yui:name" title="_parseType">_parseType</a><span class="private">,</span>
</span>
<a class="" href="EventTarget.html#method_addTarget" property="yui:name" title="addTarget">addTarget</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_after" property="yui:name" title="after">after</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_before" property="yui:name" title="before">before</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_bubble" property="yui:name" title="bubble">bubble</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_detach" property="yui:name" title="detach">detach</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_detachAll" property="yui:name" title="detachAll">detachAll</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_fire" property="yui:name" title="fire">fire</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_getEvent" property="yui:name" title="getEvent">getEvent</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_on" property="yui:name" title="on">on</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_publish" property="yui:name" title="publish">publish</a><span class="">,</span>
</span>
<a class="" href="EventTarget.html#method_removeTarget" property="yui:name" title="removeTarget">removeTarget</a><span class="">,</span>
</span>
<a class=" deprecated" href="EventTarget.html#method_subscribe" property="yui:name" title="subscribe">subscribe</a><span class=" deprecated">,</span>
</span>
<a class=" deprecated" href="EventTarget.html#method_unsubscribe" property="yui:name" title="unsubscribe">unsubscribe</a><span class=" deprecated">,</span>
</span>
<a class=" deprecated" href="EventTarget.html#method_unsubscribeAll" property="yui:name" title="unsubscribeAll">unsubscribeAll</a>
</span>
</code>
</div>
</div>
<h4>Methods inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Attribute.html#method__addAttrs" property="yui:name" title="_addAttrs">_addAttrs</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__addLazyAttr" property="yui:name" title="_addLazyAttr">_addLazyAttr</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__defAttrChangeFn" property="yui:name" title="_defAttrChangeFn">_defAttrChangeFn</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__fireAttrChange" property="yui:name" title="_fireAttrChange">_fireAttrChange</a><span class="private">,</span>
</span>
<a class="protected" href="Attribute.html#method__getAttr" property="yui:name" title="_getAttr">_getAttr</a><span class="protected">,</span>
</span>
<a class="private" href="Attribute.html#method__getAttrInitVal" property="yui:name" title="_getAttrInitVal">_getAttrInitVal</a><span class="private">,</span>
</span>
<a class="protected" href="Attribute.html#method__getAttrs" property="yui:name" title="_getAttrs">_getAttrs</a><span class="protected">,</span>
</span>
<a class="private" href="Attribute.html#method__getStateVal" property="yui:name" title="_getStateVal">_getStateVal</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__isLazyAttr" property="yui:name" title="_isLazyAttr">_isLazyAttr</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__normAttrVals" property="yui:name" title="_normAttrVals">_normAttrVals</a><span class="private">,</span>
</span>
<a class="protected" href="Attribute.html#method__protectAttrs" property="yui:name" title="_protectAttrs">_protectAttrs</a><span class="protected">,</span>
</span>
<a class="protected" href="Attribute.html#method__set" property="yui:name" title="_set">_set</a><span class="protected">,</span>
</span>
<a class="protected" href="Attribute.html#method__setAttr" property="yui:name" title="_setAttr">_setAttr</a><span class="protected">,</span>
</span>
<a class="protected" href="Attribute.html#method__setAttrs" property="yui:name" title="_setAttrs">_setAttrs</a><span class="protected">,</span>
</span>
<a class="private" href="Attribute.html#method__setAttrVal" property="yui:name" title="_setAttrVal">_setAttrVal</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__setStateVal" property="yui:name" title="_setStateVal">_setStateVal</a><span class="private">,</span>
</span>
<a class="" href="Attribute.html#method_addAttr" property="yui:name" title="addAttr">addAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_addAttrs" property="yui:name" title="addAttrs">addAttrs</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_attrAdded" property="yui:name" title="attrAdded">attrAdded</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_get" property="yui:name" title="get">get</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_getAttrs" property="yui:name" title="getAttrs">getAttrs</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_modifyAttr" property="yui:name" title="modifyAttr">modifyAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_removeAttr" property="yui:name" title="removeAttr">removeAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_reset" property="yui:name" title="reset">reset</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_set" property="yui:name" title="set">set</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
<h4>Methods inherited from <a href="Plugin.Host.html" property="yui:name" title="Plugin.Host">Plugin.Host</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Plugin.Host.html#method__destroyPlugins" property="yui:name" title="_destroyPlugins">_destroyPlugins</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__initPlugins" property="yui:name" title="_initPlugins">_initPlugins</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__plug" property="yui:name" title="_plug">_plug</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__unplug" property="yui:name" title="_unplug">_unplug</a><span class="private">,</span>
</span>
<a class="" href="Plugin.Host.html#method_hasPlugin" property="yui:name" title="hasPlugin">hasPlugin</a><span class="">,</span>
</span>
<a class="" href="Plugin.Host.html#method_plug" property="yui:name" title="plug">plug</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Base.html#method__aggregateAttrs" property="yui:name" title="_aggregateAttrs">_aggregateAttrs</a><span class="private">,</span>
</span>
<a class="protected" href="Base.html#method__defDestroyFn" property="yui:name" title="_defDestroyFn">_defDestroyFn</a><span class="protected">,</span>
</span>
<a class="protected" href="Base.html#method__defInitFn" property="yui:name" title="_defInitFn">_defInitFn</a><span class="protected">,</span>
</span>
<a class="private" href="Base.html#method__destroyHierarchy" property="yui:name" title="_destroyHierarchy">_destroyHierarchy</a><span class="private">,</span>
</span>
<a class="private" href="Base.html#method__filterAttrCfs" property="yui:name" title="_filterAttrCfs">_filterAttrCfs</a><span class="private">,</span>
</span>
<a class="protected" href="Base.html#method__getAttrCfgs" property="yui:name" title="_getAttrCfgs">_getAttrCfgs</a><span class="protected">,</span>
</span>
<a class="protected" href="Base.html#method__getClasses" property="yui:name" title="_getClasses">_getClasses</a><span class="protected">,</span>
</span>
<a class="private" href="Base.html#method__initHierarchy" property="yui:name" title="_initHierarchy">_initHierarchy</a><span class="private">,</span>
</span>
<a class="private" href="Base.html#method__initHierarchyData" property="yui:name" title="_initHierarchyData">_initHierarchyData</a><span class="private">,</span>
</span>
<a class="" href="Base.html#method__preInitEventCfg" property="yui:name" title="_preInitEventCfg">_preInitEventCfg</a><span class="">,</span>
</span>
<a class="" href="Base.html#method_destroy" property="yui:name" title="destroy">destroy</a><span class="">,</span>
</span>
<a class="" href="Base.html#method_init" property="yui:name" title="init">init</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
<div class="section method details">
<h3 id="events">Events</h3>
<div class="content">
<div class="" rel="yui:event" resource="#event_cacheRegionChange">
<h4>
<a name="event_cacheRegionChange">cacheRegionChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">cacheRegionChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'cacheRegion' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_constrain2nodeChange">
<h4>
<a name="event_constrain2nodeChange">constrain2nodeChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">constrain2nodeChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'constrain2node' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_constrain2regionChange">
<h4>
<a name="event_constrain2regionChange">constrain2regionChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">constrain2regionChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'constrain2region' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_constrain2viewChange">
<h4>
<a name="event_constrain2viewChange">constrain2viewChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">constrain2viewChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'constrain2view' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_gutterChange">
<h4>
<a name="event_gutterChange">gutterChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">gutterChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'gutter' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_stickXChange">
<h4>
<a name="event_stickXChange">stickXChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">stickXChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'stickX' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_stickYChange">
<h4>
<a name="event_stickYChange">stickYChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">stickYChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'stickY' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_tickXArrayChange">
<h4>
<a name="event_tickXArrayChange">tickXArrayChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">tickXArrayChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'tickXArray' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_tickXChange">
<h4>
<a name="event_tickXChange">tickXChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">tickXChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'tickX' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_tickYArrayChange">
<h4>
<a name="event_tickYArrayChange">tickYArrayChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">tickYArrayChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'tickYArray' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:event" resource="#event_tickYChange">
<h4>
<a name="event_tickYChange">tickYChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">tickYChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'tickY' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<div class="content" rel="yui:events">
<code>
<a class="" href="Base.html#event_destroy" property="yui:name" title="destroy">destroy</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_destroyedChange" property="yui:name" title="destroyedChange">destroyedChange</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_init" property="yui:name" title="init">init</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_initializedChange" property="yui:name" title="initializedChange">initializedChange</a><span class="">,</span>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:attributes" resource="#configattributes">
<div class="section field details">
<h3 id="configattributes">Configuration Attributes</h3>
<div class="content">
<div class="" rel="yui:attribute" resource="#config_cacheRegion">
<h4><a name="config_cacheRegion">cacheRegion</a>
<code>- <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Should the region be cached for performace. Default: true
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_constrain2node">
<h4><a name="config_constrain2node">constrain2node</a>
<code>- <span property="yui:type">Object</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Will attempt to constrain the drag node to the boundaries of this node.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_constrain2region">
<h4><a name="config_constrain2region">constrain2region</a>
<code>- <span property="yui:type">Object</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
An Object Literal containing a valid region (top, right, bottom, left) of page positions to constrain the drag node to.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_constrain2view">
<h4><a name="config_constrain2view">constrain2view</a>
<code>- <span property="yui:type">Object</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Will attempt to constrain the drag node to the boundaries of the viewport region.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_gutter">
<h4><a name="config_gutter">gutter</a>
<code>- <span property="yui:type">String</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
CSS style string for the gutter of a region (supports negative values): '5 0' (sets top and bottom to 5px, left and right to 0px), '1 2 3 4' (top 1px, right 2px, bottom 3px, left 4px)
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_stickX">
<h4><a name="config_stickX">stickX</a>
<code>- <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Stick the drag movement to the X-Axis. Default: false
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_stickY">
<h4><a name="config_stickY">stickY</a>
<code>- <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Stick the drag movement to the Y-Axis
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_tickX">
<h4><a name="config_tickX">tickX</a>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The X tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_tickXArray">
<h4><a name="config_tickXArray">tickXArray</a>
<code>- <span property="yui:type">Array</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
An array of page coordinates to use as X ticks for drag movement.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_tickY">
<h4><a name="config_tickY">tickY</a>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The Y tick offset the drag node should snap to on each drag move. False for no ticks. Default: false
</div>
</div>
<hr />
</div>
<div class="" rel="yui:attribute" resource="#config_tickYArray">
<h4><a name="config_tickYArray">tickYArray</a>
<code>- <span property="yui:type">Array</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
An array of page coordinates to use as Y ticks for drag movement.
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Configuration attributes inherited from <a href="Base.html" property="yui:name" title="Base">Base</a>:</h4>
<div class="content" rel="yui:attributes">
<code>
</span>
<a class="" href="Base.html#config_initialized" property="yui:name" title="initialized">initialized</a>
</span>
</code>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
<li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
<li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="Plugin.DDNodeScroll.html" title="Plugin.DDNodeScroll">Plugin.DDNodeScroll</a></li>
<li class=""><a href="Plugin.DDWindowScroll.html" title="Plugin.DDWindowScroll">Plugin.DDWindowScroll</a></li>
<li class="selected"><a href="Plugin.DragConstrained.html" title="Plugin.DragConstrained">Plugin.DragConstrained</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
</ul>
</div>
<div id="propertyList" class="module">
<h4>Properties</h4>
<ul class="content">
<li class="private"><a href="#property__regionCache" title="_regionCache">_regionCache</a></li>
<li class=""><a href="#property_con" title="con">con</a></li>
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class="private"><a href="#method__cacheRegion" title="_cacheRegion">_cacheRegion</a></li>
<li class="private"><a href="#method__checkRegion" title="_checkRegion">_checkRegion</a></li>
<li class="private"><a href="#method__checkTicks" title="_checkTicks">_checkTicks</a></li>
<li class="private"><a href="#method__handleStart" title="_handleStart">_handleStart</a></li>
<li class=""><a href="#method_align" title="align">align</a></li>
<li class=""><a href="#method_getRegion" title="getRegion">getRegion</a></li>
<li class=""><a href="#method_inRegion" title="inRegion">inRegion</a></li>
<li class=""><a href="#method_resetCache" title="resetCache">resetCache</a></li>
</ul>
</div>
<div id="eventsList" class="module">
<h4>Events</h4>
<ul class="content">
<li class=""><a href="#event_cacheRegionChange" title="cacheRegionChange">cacheRegionChange</a></li>
<li class=""><a href="#event_constrain2nodeChange" title="constrain2nodeChange">constrain2nodeChange</a></li>
<li class=""><a href="#event_constrain2regionChange" title="constrain2regionChange">constrain2regionChange</a></li>
<li class=""><a href="#event_constrain2viewChange" title="constrain2viewChange">constrain2viewChange</a></li>
<li class=""><a href="#event_gutterChange" title="gutterChange">gutterChange</a></li>
<li class=""><a href="#event_stickXChange" title="stickXChange">stickXChange</a></li>
<li class=""><a href="#event_stickYChange" title="stickYChange">stickYChange</a></li>
<li class=""><a href="#event_tickXArrayChange" title="tickXArrayChange">tickXArrayChange</a></li>
<li class=""><a href="#event_tickXChange" title="tickXChange">tickXChange</a></li>
<li class=""><a href="#event_tickYArrayChange" title="tickYArrayChange">tickYArrayChange</a></li>
<li class=""><a href="#event_tickYChange" title="tickYChange">tickYChange</a></li>
</ul>
</div>
<div id="configList" class="module">
<h4>Configuration Attributes</h4>
<ul class="content">
<li class=""><a href="#config_cacheRegion" title="cacheRegion">cacheRegion</a></li>
<li class=""><a href="#config_constrain2node" title="constrain2node">constrain2node</a></li>
<li class=""><a href="#config_constrain2region" title="constrain2region">constrain2region</a></li>
<li class=""><a href="#config_constrain2view" title="constrain2view">constrain2view</a></li>
<li class=""><a href="#config_gutter" title="gutter">gutter</a></li>
<li class=""><a href="#config_stickX" title="stickX">stickX</a></li>
<li class=""><a href="#config_stickY" title="stickY">stickY</a></li>
<li class=""><a href="#config_tickX" title="tickX">tickX</a></li>
<li class=""><a href="#config_tickXArray" title="tickXArray">tickXArray</a></li>
<li class=""><a href="#config_tickY" title="tickY">tickY</a></li>
<li class=""><a href="#config_tickYArray" title="tickYArray">tickYArray</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2010 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
var ALL_YUI_PROPS = [{"access": "", "host": "Plugin.DragConstrained", "name": "align", "url": "Plugin.DragConstrained.html#method_align", "type": "method"}, {"access": "private", "host": "Plugin.DragConstrained", "name": "_cacheRegion", "url": "Plugin.DragConstrained.html#method__cacheRegion", "type": "method"}, {"access": "", "host": "Plugin.DragConstrained", "name": "cacheRegion", "url": "Plugin.DragConstrained.html#config_cacheRegion", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "cacheRegionChange", "url": "Plugin.DragConstrained.html#event_cacheRegionChange", "type": "event"}, {"access": "private", "host": "Plugin.DragConstrained", "name": "_checkRegion", "url": "Plugin.DragConstrained.html#method__checkRegion", "type": "method"}, {"access": "private", "host": "Plugin.DragConstrained", "name": "_checkTicks", "url": "Plugin.DragConstrained.html#method__checkTicks", "type": "method"}, {"access": "", "host": "Plugin.DragConstrained", "name": "con", "url": "Plugin.DragConstrained.html#property_con", "type": "property"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2node", "url": "Plugin.DragConstrained.html#config_constrain2node", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2nodeChange", "url": "Plugin.DragConstrained.html#event_constrain2nodeChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2region", "url": "Plugin.DragConstrained.html#config_constrain2region", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2regionChange", "url": "Plugin.DragConstrained.html#event_constrain2regionChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2view", "url": "Plugin.DragConstrained.html#config_constrain2view", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "constrain2viewChange", "url": "Plugin.DragConstrained.html#event_constrain2viewChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "getRegion", "url": "Plugin.DragConstrained.html#method_getRegion", "type": "method"}, {"access": "", "host": "Plugin.DragConstrained", "name": "gutter", "url": "Plugin.DragConstrained.html#config_gutter", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "gutterChange", "url": "Plugin.DragConstrained.html#event_gutterChange", "type": "event"}, {"access": "private", "host": "Plugin.DragConstrained", "name": "_handleStart", "url": "Plugin.DragConstrained.html#method__handleStart", "type": "method"}, {"access": "", "host": "Plugin.DragConstrained", "name": "inRegion", "url": "Plugin.DragConstrained.html#method_inRegion", "type": "method"}, {"access": "private", "host": "Plugin.DragConstrained", "name": "_regionCache", "url": "Plugin.DragConstrained.html#property__regionCache", "type": "property"}, {"access": "", "host": "Plugin.DragConstrained", "name": "resetCache", "url": "Plugin.DragConstrained.html#method_resetCache", "type": "method"}, {"access": "", "host": "Plugin.DragConstrained", "name": "stickX", "url": "Plugin.DragConstrained.html#config_stickX", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "stickXChange", "url": "Plugin.DragConstrained.html#event_stickXChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "stickY", "url": "Plugin.DragConstrained.html#config_stickY", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "stickYChange", "url": "Plugin.DragConstrained.html#event_stickYChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickX", "url": "Plugin.DragConstrained.html#config_tickX", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickXArray", "url": "Plugin.DragConstrained.html#config_tickXArray", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickXArrayChange", "url": "Plugin.DragConstrained.html#event_tickXArrayChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickXChange", "url": "Plugin.DragConstrained.html#event_tickXChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickY", "url": "Plugin.DragConstrained.html#config_tickY", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickYArray", "url": "Plugin.DragConstrained.html#config_tickYArray", "type": "config"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickYArrayChange", "url": "Plugin.DragConstrained.html#event_tickYArrayChange", "type": "event"}, {"access": "", "host": "Plugin.DragConstrained", "name": "tickYChange", "url": "Plugin.DragConstrained.html#event_tickYChange", "type": "event"}];
</script>
</body>
</html>