Automated build for v0.01
This commit is contained in:
8
lib/dojo/dnd/AutoSource.js
Normal file
8
lib/dojo/dnd/AutoSource.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/AutoSource",["../_base/declare","./Source"],function(_1,_2){return _1("dojo.dnd.AutoSource",_2,{constructor:function(){this.autoSync=true;}});});
|
8
lib/dojo/dnd/Avatar.js
Normal file
8
lib/dojo/dnd/Avatar.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Avatar",["../_base/declare","../_base/window","../dom","../dom-attr","../dom-class","../dom-construct","../hccss","../query"],function(_1,_2,_3,_4,_5,_6,_7,_8){return _1("dojo.dnd.Avatar",null,{constructor:function(_9){this.manager=_9;this.construct();},construct:function(){var a=_6.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_a=this.manager.source,_b,b=_6.create("tbody",null,a),tr=_6.create("tr",null,b),td=_6.create("td",null,tr),k=Math.min(5,this.manager.nodes.length),i=0;if(_7("highcontrast")){_6.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td);}_6.create("span",{innerHTML:_a.generateText?this._generateText():""},td);_4.set(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_a.creator){_b=_a._normalizedCreator(_a.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{_b=this.manager.nodes[i].cloneNode(true);if(_b.tagName.toLowerCase()=="tr"){var _c=_6.create("table"),_d=_6.create("tbody",null,_c);_d.appendChild(_b);_b=_c;}}_b.id="";tr=_6.create("tr",null,b);td=_6.create("td",null,tr);td.appendChild(_b);_4.set(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_6.destroy(this.node);this.node=false;},update:function(){_5.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(_7("highcontrast")){var _e=_3.byId("a11yIcon");var _f="+";if(this.manager.canDropFlag&&!this.manager.copy){_f="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){_f="o";}else{if(!this.manager.canDropFlag){_f="x";}}}_e.innerHTML=_f;}_8(("tr.dojoDndAvatarHeader td span"+(_7("highcontrast")?" span":"")),this.node).forEach(function(_10){_10.innerHTML=this.manager.source.generateText?this._generateText():"";},this);},_generateText:function(){return this.manager.nodes.length.toString();}});});
|
8
lib/dojo/dnd/Container.js
Normal file
8
lib/dojo/dnd/Container.js
Normal file
File diff suppressed because one or more lines are too long
8
lib/dojo/dnd/Manager.js
Normal file
8
lib/dojo/dnd/Manager.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Manager",["../_base/array","../_base/declare","../_base/lang","../_base/window","../dom-class","../Evented","../has","../keys","../on","../topic","../touch","./common","./autoscroll","./Avatar"],function(_1,_2,_3,_4,_5,_6,_7,_8,on,_9,_a,_b,_c,_d){var _e=_2("dojo.dnd.Manager",[_6],{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:_7("touch")?4:16,OFFSET_Y:_7("touch")?4:16,overSource:function(_f){if(this.avatar){this.target=(_f&&_f.targetState!="Disabled")?_f:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}_9.publish("/dnd/source/over",_f);},outSource:function(_10){if(this.avatar){if(this.target==_10){this.target=null;this.canDropFlag=false;this.avatar.update();_9.publish("/dnd/source/over",null);}}else{_9.publish("/dnd/source/over",null);}},startDrag:function(_11,_12,_13){_c.autoScrollStart(_4.doc);this.source=_11;this.nodes=_12;this.copy=Boolean(_13);this.avatar=this.makeAvatar();_4.body().appendChild(this.avatar.node);_9.publish("/dnd/start",_11,_12,this.copy);function _14(e){e.preventDefault();e.stopPropagation();};this.events=[on(_4.doc,_a.move,_3.hitch(this,"onMouseMove")),on(_4.doc,_a.release,_3.hitch(this,"onMouseUp")),on(_4.doc,"keydown",_3.hitch(this,"onKeyDown")),on(_4.doc,"keyup",_3.hitch(this,"onKeyUp")),on(_4.doc,"dragstart",_14),on(_4.body(),"selectstart",_14)];var c="dojoDnd"+(_13?"Copy":"Move");_5.add(_4.body(),c);},canDrop:function(_15){var _16=Boolean(this.target&&_15);if(this.canDropFlag!=_16){this.canDropFlag=_16;this.avatar.update();}},stopDrag:function(){_5.remove(_4.body(),["dojoDndCopy","dojoDndMove"]);_1.forEach(this.events,function(_17){_17.remove();});this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new _d(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){_c.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var _18=Boolean(this.source.copyState(_b.getCopyKeyState(e)));if(this.copy!=_18){this._setCopyStatus(_18);}}if(_7("touch")){e.preventDefault();}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var _19=Boolean(this.source.copyState(_b.getCopyKeyState(e)));_9.publish("/dnd/drop/before",this.source,this.nodes,_19,this.target,e);_9.publish("/dnd/drop",this.source,this.nodes,_19,this.target,e);}else{_9.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case _8.CTRL:var _1a=Boolean(this.source.copyState(true));if(this.copy!=_1a){this._setCopyStatus(_1a);}break;case _8.ESCAPE:_9.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==_8.CTRL){var _1b=Boolean(this.source.copyState(false));if(this.copy!=_1b){this._setCopyStatus(_1b);}}},_setCopyStatus:function(_1c){this.copy=_1c;this.source._markDndStatus(this.copy);this.updateAvatar();_5.replace(_4.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});_b._manager=null;_e.manager=_b.manager=function(){if(!_b._manager){_b._manager=new _e();}return _b._manager;};return _e;});
|
8
lib/dojo/dnd/Moveable.js
Normal file
8
lib/dojo/dnd/Moveable.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Moveable",["../_base/array","../_base/declare","../_base/lang","../dom","../dom-class","../Evented","../has","../on","../topic","../touch","./common","./Mover","../_base/window"],function(_1,_2,_3,_4,_5,_6,_7,on,_8,_9,_a,_b,_c){var _d;var _e=function(){};function _f(){if("touchAction" in document.body.style){_d="touchAction";}else{if("msTouchAction" in document.body.style){_d="msTouchAction";}}_e=function _e(_10,_11){_10.style[_d]=_11;};_e(arguments[0],arguments[1]);};if(_7("touch-action")){_e=_f;}var _12=_2("dojo.dnd.Moveable",[_6],{handle:"",delay:0,skip:false,constructor:function(_13,_14){this.node=_4.byId(_13);_e(this.node,"none");if(!_14){_14={};}this.handle=_14.handle?_4.byId(_14.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_14.delay>0?_14.delay:0;this.skip=_14.skip;this.mover=_14.mover?_14.mover:_b;this.events=[on(this.handle,_9.press,_3.hitch(this,"onMouseDown")),on(this.handle,"dragstart",_3.hitch(this,"onSelectStart")),on(this.handle,"selectstart",_3.hitch(this,"onSelectStart"))];},markupFactory:function(_15,_16,_17){return new _17(_16,_15);},destroy:function(){_1.forEach(this.events,function(_18){_18.remove();});_e(this.node,"");this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&_a.isFormElement(e)){return;}if(this.delay){this.events.push(on(this.handle,_9.move,_3.hitch(this,"onMouseMove")),on(this.handle.ownerDocument,_9.release,_3.hitch(this,"onMouseUp")));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}e.stopPropagation();e.preventDefault();},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}e.stopPropagation();e.preventDefault();},onMouseUp:function(e){for(var i=0;i<2;++i){this.events.pop().remove();}e.stopPropagation();e.preventDefault();},onSelectStart:function(e){if(!this.skip||!_a.isFormElement(e)){e.stopPropagation();e.preventDefault();}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_19){_8.publish("/dnd/move/start",_19);_5.add(_c.body(),"dojoMove");_5.add(this.node,"dojoMoveItem");},onMoveStop:function(_1a){_8.publish("/dnd/move/stop",_1a);_5.remove(_c.body(),"dojoMove");_5.remove(this.node,"dojoMoveItem");},onFirstMove:function(){},onMove:function(_1b,_1c){this.onMoving(_1b,_1c);var s=_1b.node.style;s.left=_1c.l+"px";s.top=_1c.t+"px";this.onMoved(_1b,_1c);},onMoving:function(){},onMoved:function(){}});return _12;});
|
8
lib/dojo/dnd/Mover.js
Normal file
8
lib/dojo/dnd/Mover.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Mover",["../_base/array","../_base/declare","../_base/lang","../sniff","../_base/window","../dom","../dom-geometry","../dom-style","../Evented","../on","../touch","./common","./autoscroll"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,on,_a,_b,_c){return _2("dojo.dnd.Mover",[_9],{constructor:function(_d,e,_e){this.node=_6.byId(_d);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=(this.host=_e),d=_d.ownerDocument;function _f(e){e.preventDefault();e.stopPropagation();};this.events=[on(d,_a.move,_3.hitch(this,"onFirstMove")),on(d,_a.move,_3.hitch(this,"onMouseMove")),on(d,_a.release,_3.hitch(this,"onMouseUp")),on(d,"dragstart",_f),on(d.body,"selectstart",_f)];_c.autoScrollStart(d);if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){_c.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);e.preventDefault();e.stopPropagation();},onMouseUp:function(e){if(_4("webkit")&&_4("mac")&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}e.preventDefault();e.stopPropagation();},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=_7.getMarginBox(this.node);var b=_5.doc.body;var bs=_8.getComputedStyle(b);var bm=_7.getMarginBox(b,bs);var bc=_7.getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}this.events.shift().remove();},destroy:function(){_1.forEach(this.events,function(_10){_10.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});});
|
8
lib/dojo/dnd/Selector.js
Normal file
8
lib/dojo/dnd/Selector.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Selector",["../_base/array","../_base/declare","../_base/kernel","../_base/lang","../dom","../dom-construct","../mouse","../_base/NodeList","../on","../touch","./common","./Container"],function(_1,_2,_3,_4,_5,_6,_7,_8,on,_9,_a,_b){var _c=_2("dojo.dnd.Selector",_b,{constructor:function(_d,_e){if(!_e){_e={};}this.singular=_e.singular;this.autoSync=_e.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(on(this.node,_9.press,_4.hitch(this,"onMouseDown")),on(this.node,_9.release,_4.hitch(this,"onMouseUp")));},singular:false,getSelectedNodes:function(){var t=new _8();var e=_a._empty;for(var i in this.selection){if(i in e){continue;}t.push(_5.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(_f,id){this._addItemClass(_5.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=_a._empty;for(var i in this.selection){if(i in e){continue;}var n=_5.byId(i);this.delItem(i);_6.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||_3.global;var s=this.selection,e=_a._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){_c.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=_a._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}_1.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_10,_11,_12,_13){var _14=this._normalizedCreator;this._normalizedCreator=function(_15,_16){var t=_14.call(this,_15,_16);if(_10){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};_c.superclass.insertNodes.call(this,_11,_12,_13);this._normalizedCreator=_14;return this;},destroy:function(){_c.superclass.destroy.call(this);this.selection=this.anchor=null;},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!_a.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(_7.isLeft(e)){e.stopPropagation();e.preventDefault();}return;}if(!this.singular&&e.shiftKey){if(!_a.getCopyKeyState(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0,_17;for(;i<c.length;++i){_17=c[i];if(_17==this.anchor||_17==this.current){break;}}for(++i;i<c.length;++i){_17=c[i];if(_17==this.anchor||_17==this.current){break;}this._addItemClass(_17,"Selected");this.selection[_17.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(_a.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(_a.getCopyKeyState(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}e.stopPropagation();e.preventDefault();},onMouseUp:function(){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=on(this.node,_9.move,_4.hitch(this,"onMouseMove"));},onOutEvent:function(){if(this.onmousemoveEvent){this.onmousemoveEvent.remove();delete this.onmousemoveEvent;}},_removeSelection:function(){var e=_a._empty;for(var i in this.selection){if(i in e){continue;}var _18=_5.byId(i);if(_18){this._removeItemClass(_18,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});return _c;});
|
8
lib/dojo/dnd/Source.js
Normal file
8
lib/dojo/dnd/Source.js
Normal file
File diff suppressed because one or more lines are too long
8
lib/dojo/dnd/Target.js
Normal file
8
lib/dojo/dnd/Target.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/Target",["../_base/declare","../dom-class","./Source"],function(_1,_2,_3){return _1("dojo.dnd.Target",_3,{constructor:function(){this.isSource=false;_2.remove(this.node,"dojoDndSource");}});});
|
8
lib/dojo/dnd/TimedMoveable.js
Normal file
8
lib/dojo/dnd/TimedMoveable.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/TimedMoveable",["../_base/declare","./Moveable"],function(_1,_2){var _3=_2.prototype.onMove;return _1("dojo.dnd.TimedMoveable",_2,{timeout:40,constructor:function(_4,_5){if(!_5){_5={};}if(_5.timeout&&typeof _5.timeout=="number"&&_5.timeout>=0){this.timeout=_5.timeout;}},onMoveStop:function(_6){if(_6._timer){clearTimeout(_6._timer);_3.call(this,_6,_6._leftTop);}_2.prototype.onMoveStop.apply(this,arguments);},onMove:function(_7,_8){_7._leftTop=_8;if(!_7._timer){var _9=this;_7._timer=setTimeout(function(){_7._timer=null;_3.call(_9,_7,_7._leftTop);},this.timeout);}}});});
|
8
lib/dojo/dnd/autoscroll.js
Normal file
8
lib/dojo/dnd/autoscroll.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/autoscroll",["../_base/lang","../sniff","../_base/window","../dom-geometry","../dom-style","../window"],function(_1,_2,_3,_4,_5,_6){var _7={};_1.setObject("dojo.dnd.autoscroll",_7);_7.getViewport=_6.getBox;_7.V_TRIGGER_AUTOSCROLL=32;_7.H_TRIGGER_AUTOSCROLL=32;_7.V_AUTOSCROLL_VALUE=16;_7.H_AUTOSCROLL_VALUE=16;var _8,_9=_3.doc,_a=Infinity,_b=Infinity;_7.autoScrollStart=function(d){_9=d;_8=_6.getBox(_9);var _c=_3.body(_9).parentNode;_a=Math.max(_c.scrollHeight-_8.h,0);_b=Math.max(_c.scrollWidth-_8.w,0);};_7.autoScroll=function(e){var v=_8||_6.getBox(_9),_d=_3.body(_9).parentNode,dx=0,dy=0;if(e.clientX<_7.H_TRIGGER_AUTOSCROLL){dx=-_7.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-_7.H_TRIGGER_AUTOSCROLL){dx=Math.min(_7.H_AUTOSCROLL_VALUE,_b-_d.scrollLeft);}}if(e.clientY<_7.V_TRIGGER_AUTOSCROLL){dy=-_7.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-_7.V_TRIGGER_AUTOSCROLL){dy=Math.min(_7.V_AUTOSCROLL_VALUE,_a-_d.scrollTop);}}window.scrollBy(dx,dy);};_7._validNodes={"div":1,"p":1,"td":1};_7._validOverflow={"auto":1,"scroll":1};_7.autoScrollNodes=function(e){var b,t,w,h,rx,ry,dx=0,dy=0,_e,_f;for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in _7._validNodes)){var s=_5.getComputedStyle(n),_10=(s.overflowX.toLowerCase() in _7._validOverflow),_11=(s.overflowY.toLowerCase() in _7._validOverflow);if(_10||_11){b=_4.getContentBox(n,s);t=_4.position(n,true);}if(_10){w=Math.min(_7.H_TRIGGER_AUTOSCROLL,b.w/2);rx=e.pageX-t.x;if(_2("webkit")||_2("opera")){rx+=_3.body().scrollLeft;}dx=0;if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}_e=n.scrollLeft;n.scrollLeft=n.scrollLeft+dx;}}if(_11){h=Math.min(_7.V_TRIGGER_AUTOSCROLL,b.h/2);ry=e.pageY-t.y;if(_2("webkit")||_2("opera")){ry+=_3.body().scrollTop;}dy=0;if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}_f=n.scrollTop;n.scrollTop=n.scrollTop+dy;}}if(dx||dy){return;}}try{n=n.parentNode;}catch(x){n=null;}}_7.autoScroll(e);};return _7;});
|
8
lib/dojo/dnd/common.js
Normal file
8
lib/dojo/dnd/common.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/common",["../sniff","../_base/kernel","../_base/lang","../dom"],function(_1,_2,_3,_4){var _5=_3.getObject("dojo.dnd",true);_5.getCopyKeyState=function(_6){return _6[_1("mac")?"metaKey":"ctrlKey"];};_5._uniqueId=0;_5.getUniqueId=function(){var id;do{id=_2._scopeName+"Unique"+(++_5._uniqueId);}while(_4.byId(id));return id;};_5._empty={};_5.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " a button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};return _5;});
|
8
lib/dojo/dnd/move.js
Normal file
8
lib/dojo/dnd/move.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
|
||||
//>>built
|
||||
define("dojo/dnd/move",["../_base/declare","../dom-geometry","../dom-style","./common","./Mover","./Moveable"],function(_1,_2,_3,_4,_5,_6){var _7=_1("dojo.dnd.move.constrainedMoveable",_6,{constraints:function(){},within:false,constructor:function(_8,_9){if(!_9){_9={};}this.constraints=_9.constraints;this.within=_9.within;},onFirstMove:function(_a){var c=this.constraintBox=this.constraints.call(this,_a);c.r=c.l+c.w;c.b=c.t+c.h;if(this.within){var mb=_2.getMarginSize(_a.node);c.r-=mb.w;c.b-=mb.h;}},onMove:function(_b,_c){var c=this.constraintBox,s=_b.node.style;this.onMoving(_b,_c);_c.l=_c.l<c.l?c.l:c.r<_c.l?c.r:_c.l;_c.t=_c.t<c.t?c.t:c.b<_c.t?c.b:_c.t;s.left=_c.l+"px";s.top=_c.t+"px";this.onMoved(_b,_c);}});var _d=_1("dojo.dnd.move.boxConstrainedMoveable",_7,{box:{},constructor:function(_e,_f){var box=_f&&_f.box;this.constraints=function(){return box;};}});var _10=_1("dojo.dnd.move.parentConstrainedMoveable",_7,{area:"content",constructor:function(_11,_12){var _13=_12&&_12.area;this.constraints=function(){var n=this.node.parentNode,s=_3.getComputedStyle(n),mb=_2.getMarginBox(n,s);if(_13=="margin"){return mb;}var t=_2.getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_13=="border"){return mb;}t=_2.getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_13=="padding"){return mb;}t=_2.getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};}});return {constrainedMoveable:_7,boxConstrainedMoveable:_d,parentConstrainedMoveable:_10};});
|
Reference in New Issue
Block a user