/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojo.dnd.move"],["require","dojo.dnd.Mover"],["require","dojo.dnd.Moveable"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojo.dnd.move"]){_4._hasResource["dojo.dnd.move"]=true;_4.provide("dojo.dnd.move");_4.require("dojo.dnd.Mover");_4.require("dojo.dnd.Moveable");_4.declare("dojo.dnd.move.constrainedMoveable",_4.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(_7,_8){return new _4.dnd.move.constrainedMoveable(_8,_7);},constructor:function(_9,_a){if(!_a){_a={};}this.constraints=_a.constraints;this.within=_a.within;},onFirstMove:function(_b){var c=this.constraintBox=this.constraints.call(this,_b);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=_4._getMarginSize(_b.node);c.r-=mb.w;c.b-=mb.h;}},onMove:function(_c,_d){var c=this.constraintBox,s=_c.node.style;this.onMoving(_c,_d);_d.l=_d.l<c.l?c.l:c.r<_d.l?c.r:_d.l;_d.t=_d.t<c.t?c.t:c.b<_d.t?c.b:_d.t;s.left=_d.l+"px";s.top=_d.t+"px";this.onMoved(_c,_d);}});_4.declare("dojo.dnd.move.boxConstrainedMoveable",_4.dnd.move.constrainedMoveable,{box:{},markupFactory:function(_e,_f){return new _4.dnd.move.boxConstrainedMoveable(_f,_e);},constructor:function(_10,_11){var box=_11&&_11.box;this.constraints=function(){return box;};}});_4.declare("dojo.dnd.move.parentConstrainedMoveable",_4.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(_12,_13){return new _4.dnd.move.parentConstrainedMoveable(_13,_12);},constructor:function(_14,_15){var _16=_15&&_15.area;this.constraints=function(){var n=this.node.parentNode,s=_4.getComputedStyle(n),mb=_4._getMarginBox(n,s);if(_16=="margin"){return mb;}var t=_4._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_16=="border"){return mb;}t=_4._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_16=="padding"){return mb;}t=_4._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});_4.dnd.constrainedMover=_4.dnd.move.constrainedMover;_4.dnd.boxConstrainedMover=_4.dnd.move.boxConstrainedMover;_4.dnd.parentConstrainedMover=_4.dnd.move.parentConstrainedMover;}}};});