summaryrefslogtreecommitdiff
path: root/lib/dijit/tree
diff options
context:
space:
mode:
authorAnders Kaseorg <[email protected]>2017-01-20 12:29:59 -0500
committerAnders Kaseorg <[email protected]>2017-01-21 13:22:14 -0500
commit6887a0f57307820b097b51aee952c555bcf69024 (patch)
treeff041c03ac0251468eb4308927052f8bd6071ca3 /lib/dijit/tree
parent9f539be3c2c93ce358b10ca396e922b3b99b56ea (diff)
lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
The itemNode and expandoNode elements have changed from img to span (https://bugs.dojotoolkit.org/ticket/16699), so we now put our tree icons inside them rather than replacing them. Signed-off-by: Anders Kaseorg <[email protected]>
Diffstat (limited to 'lib/dijit/tree')
-rw-r--r--lib/dijit/tree/ObjectStoreModel.js2
-rw-r--r--lib/dijit/tree/_dndContainer.js2
-rw-r--r--lib/dijit/tree/_dndSelector.js2
-rw-r--r--lib/dijit/tree/dndSource.js2
-rw-r--r--lib/dijit/tree/model.js2
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/dijit/tree/ObjectStoreModel.js b/lib/dijit/tree/ObjectStoreModel.js
index 7021bec52..6592d74ff 100644
--- a/lib/dijit/tree/ObjectStoreModel.js
+++ b/lib/dijit/tree/ObjectStoreModel.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/tree/ObjectStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang","dojo/when"],function(_1,_2,_3,_4,_5){return _3("dijit.tree.ObjectStoreModel",null,{store:null,labelAttr:"name",root:null,query:null,constructor:function(_6){_4.mixin(this,_6);this.childrenCache={};},destroy:function(){for(var id in this.childrenCache){this.childrenCache[id].close&&this.childrenCache[id].close();}},getRoot:function(_7,_8){if(this.root){_7(this.root);}else{var _9;_5(_9=this.store.query(this.query),_4.hitch(this,function(_a){if(_a.length!=1){throw new Error("dijit.tree.ObjectStoreModel: root query returned "+_a.length+" items, but must return exactly one");}this.root=_a[0];_7(this.root);if(_9.observe){_9.observe(_4.hitch(this,function(_b){this.onChange(_b);}),true);}}),_8);}},mayHaveChildren:function(){return true;},getChildren:function(_c,_d,_e){var id=this.store.getIdentity(_c);if(this.childrenCache[id]){_5(this.childrenCache[id],_d,_e);return;}var _f=this.childrenCache[id]=this.store.getChildren(_c);_5(_f,_d,_e);if(_f.observe){_f.observe(_4.hitch(this,function(obj,_10,_11){this.onChange(obj);if(_10!=_11){_5(_f,_4.hitch(this,"onChildrenChange",_c));}}),true);}},isItem:function(){return true;},fetchItemByIdentity:function(_12){this.store.get(_12.identity).then(_4.hitch(_12.scope,_12.onItem),_4.hitch(_12.scope,_12.onError));},getIdentity:function(_13){return this.store.getIdentity(_13);},getLabel:function(_14){return _14[this.labelAttr];},newItem:function(_15,_16,_17,_18){return this.store.put(_15,{parent:_16,before:_18});},pasteItem:function(_19,_1a,_1b,_1c,_1d,_1e){if(!_1c){var _1f=[].concat(this.childrenCache[this.getIdentity(_1a)]),_20=_1.indexOf(_1f,_19);_1f.splice(_20,1);this.onChildrenChange(_1a,_1f);}return this.store.put(_19,{overwrite:true,parent:_1b,before:_1e});},onChange:function(){},onChildrenChange:function(){},onDelete:function(){}});}); \ No newline at end of file
+define("dijit/tree/ObjectStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/Deferred","dojo/_base/lang","dojo/when","../Destroyable"],function(_1,_2,_3,_4,_5,_6,_7){return _3("dijit.tree.ObjectStoreModel",_7,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(_8){_5.mixin(this,_8);this.childrenCache={};},getRoot:function(_9,_a){if(this.root){_9(this.root);}else{var _b=this.store.query(this.query);if(_b.then){this.own(_b);}_6(_b,_5.hitch(this,function(_c){if(_c.length!=1){throw new Error("dijit.tree.ObjectStoreModel: root query returned "+_c.length+" items, but must return exactly one");}this.root=_c[0];_9(this.root);if(_b.observe){_b.observe(_5.hitch(this,function(_d){this.onChange(_d);}),true);}}),_a);}},mayHaveChildren:function(){return true;},getChildren:function(_e,_f,_10){var id=this.store.getIdentity(_e);if(this.childrenCache[id]){_6(this.childrenCache[id],_f,_10);return;}var res=this.childrenCache[id]=this.store.getChildren(_e);if(res.then){this.own(res);}if(res.observe){this.own(res.observe(_5.hitch(this,function(obj,_11,_12){this.onChange(obj);if(_11!=_12){_6(res,_5.hitch(this,"onChildrenChange",_e));}}),true));}_6(res,_f,_10);},isItem:function(){return true;},getIdentity:function(_13){return this.store.getIdentity(_13);},getLabel:function(_14){return _14[this.labelAttr];},newItem:function(_15,_16,_17,_18){return this.store.put(_15,{parent:_16,before:_18});},pasteItem:function(_19,_1a,_1b,_1c,_1d,_1e){var d=new _4();if(_1a===_1b&&!_1c&&!_1e){d.resolve(true);return d;}if(_1a&&!_1c){this.getChildren(_1a,_5.hitch(this,function(_1f){_1f=[].concat(_1f);var _20=_1.indexOf(_1f,_19);_1f.splice(_20,1);this.onChildrenChange(_1a,_1f);d.resolve(this.store.put(_19,{overwrite:true,parent:_1b,oldParent:_1a,before:_1e}));}));}else{d.resolve(this.store.put(_19,{overwrite:true,parent:_1b,oldParent:_1a,before:_1e}));}return d;},onChange:function(){},onChildrenChange:function(){},onDelete:function(){}});}); \ No newline at end of file
diff --git a/lib/dijit/tree/_dndContainer.js b/lib/dijit/tree/_dndContainer.js
index c42bb417c..e283fe30f 100644
--- a/lib/dijit/tree/_dndContainer.js
+++ b/lib/dijit/tree/_dndContainer.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/tree/_dndContainer",["dojo/aspect","dojo/_base/declare","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/on","dojo/touch"],function(_1,_2,_3,_4,_5,on,_6){return _2("dijit.tree._dndContainer",null,{constructor:function(_7,_8){this.tree=_7;this.node=_7.domNode;_5.mixin(this,_8);this.current=null;this.containerState="";_3.add(this.node,"dojoDndContainer");this.events=[on(this.node,_6.enter,_5.hitch(this,"onOverEvent")),on(this.node,_6.leave,_5.hitch(this,"onOutEvent")),_1.after(this.tree,"_onNodeMouseEnter",_5.hitch(this,"onMouseOver"),true),_1.after(this.tree,"_onNodeMouseLeave",_5.hitch(this,"onMouseOut"),true),on(this.node,"dragstart",_5.hitch(_4,"stop")),on(this.node,"selectstart",_5.hitch(_4,"stop"))];},destroy:function(){var h;while(h=this.events.pop()){h.remove();}this.node=this.parent=null;},onMouseOver:function(_9){this.current=_9;},onMouseOut:function(){this.current=null;},_changeState:function(_a,_b){var _c="dojoDnd"+_a;var _d=_a.toLowerCase()+"State";_3.replace(this.node,_c+_b,_c+this[_d]);this[_d]=_b;},_addItemClass:function(_e,_f){_3.add(_e,"dojoDndItem"+_f);},_removeItemClass:function(_10,_11){_3.remove(_10,"dojoDndItem"+_11);},onOverEvent:function(){this._changeState("Container","Over");},onOutEvent:function(){this._changeState("Container","");}});}); \ No newline at end of file
+define("dijit/tree/_dndContainer",["dojo/aspect","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/on","dojo/touch"],function(_1,_2,_3,_4,on,_5){return _2("dijit.tree._dndContainer",null,{constructor:function(_6,_7){this.tree=_6;this.node=_6.domNode;_4.mixin(this,_7);this.containerState="";_3.add(this.node,"dojoDndContainer");this.events=[on(this.node,_5.enter,_4.hitch(this,"onOverEvent")),on(this.node,_5.leave,_4.hitch(this,"onOutEvent")),_1.after(this.tree,"_onNodeMouseEnter",_4.hitch(this,"onMouseOver"),true),_1.after(this.tree,"_onNodeMouseLeave",_4.hitch(this,"onMouseOut"),true),on(this.node,"dragstart, selectstart",function(_8){_8.preventDefault();})];},destroy:function(){var h;while(h=this.events.pop()){h.remove();}this.node=this.parent=null;},onMouseOver:function(_9){this.current=_9;},onMouseOut:function(){this.current=null;},_changeState:function(_a,_b){var _c="dojoDnd"+_a;var _d=_a.toLowerCase()+"State";_3.replace(this.node,_c+_b,_c+this[_d]);this[_d]=_b;},_addItemClass:function(_e,_f){_3.add(_e,"dojoDndItem"+_f);},_removeItemClass:function(_10,_11){_3.remove(_10,"dojoDndItem"+_11);},onOverEvent:function(){this._changeState("Container","Over");},onOutEvent:function(){this._changeState("Container","");}});}); \ No newline at end of file
diff --git a/lib/dijit/tree/_dndSelector.js b/lib/dijit/tree/_dndSelector.js
index 2bb8bb1ed..bc2d906c7 100644
--- a/lib/dijit/tree/_dndSelector.js
+++ b/lib/dijit/tree/_dndSelector.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/tree/_dndSelector",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/Deferred","dojo/_base/kernel","dojo/_base/lang","dojo/cookie","dojo/mouse","dojo/on","dojo/touch","./_dndContainer"],function(_1,_2,_3,_4,_5,_6,_7,_8,on,_9,_a){return _3("dijit.tree._dndSelector",_a,{constructor:function(){this.selection={};this.anchor=null;if(!this.cookieName&&this.tree.id){this.cookieName=this.tree.id+"SaveSelectedCookie";}this.events.push(on(this.tree.domNode,_9.press,_6.hitch(this,"onMouseDown")),on(this.tree.domNode,_9.release,_6.hitch(this,"onMouseUp")),on(this.tree.domNode,_9.move,_6.hitch(this,"onMouseMove")));},singular:false,getSelectedTreeNodes:function(){var _b=[],_c=this.selection;for(var i in _c){_b.push(_c[i]);}return _b;},selectNone:function(){this.setSelection([]);return this;},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null;},addTreeNode:function(_d,_e){this.setSelection(this.getSelectedTreeNodes().concat([_d]));if(_e){this.anchor=_d;}return _d;},removeTreeNode:function(_f){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[_f]));return _f;},isTreeNodeSelected:function(_10){return _10.id&&!!this.selection[_10.id];},setSelection:function(_11){var _12=this.getSelectedTreeNodes();_1.forEach(this._setDifference(_12,_11),_6.hitch(this,function(_13){_13.setSelected(false);if(this.anchor==_13){delete this.anchor;}delete this.selection[_13.id];}));_1.forEach(this._setDifference(_11,_12),_6.hitch(this,function(_14){_14.setSelected(true);this.selection[_14.id]=_14;}));this._updateSelectionProperties();},_setDifference:function(xs,ys){_1.forEach(ys,function(y){y.__exclude__=true;});var ret=_1.filter(xs,function(x){return !x.__exclude__;});_1.forEach(ys,function(y){delete y["__exclude__"];});return ret;},_updateSelectionProperties:function(){var _15=this.getSelectedTreeNodes();var _16=[],_17=[],_18=[];_1.forEach(_15,function(_19){var ary=_19.getTreePath(),_1a=this.tree.model;_17.push(_19);_16.push(ary);ary=_1.map(ary,function(_1b){return _1a.getIdentity(_1b);},this);_18.push(ary.join("/"));},this);var _1c=_1.map(_17,function(_1d){return _1d.item;});this.tree._set("paths",_16);this.tree._set("path",_16[0]||[]);this.tree._set("selectedNodes",_17);this.tree._set("selectedNode",_17[0]||null);this.tree._set("selectedItems",_1c);this.tree._set("selectedItem",_1c[0]||null);if(this.tree.persist&&_18.length>0){_7(this.cookieName,_18.join(","),{expires:365});}},_getSavedPaths:function(){var _1e=this.tree;if(_1e.persist&&_1e.dndController.cookieName){var _1f,_20=[];_1f=_7(_1e.dndController.cookieName);if(_1f){_20=_1.map(_1f.split(","),function(_21){return _21.split("/");});}return _20;}},onMouseDown:function(e){if(!this.current||this.tree.isExpandoNode(e.target,this.current)){return;}if(_8.isLeft(e)){e.preventDefault();}else{if(e.type!="touchstart"){return;}}var _22=this.current,_23=_2.isCopyKey(e),id=_22.id;if(!this.singular&&!e.shiftKey&&this.selection[id]){this._doDeselect=true;return;}else{this._doDeselect=false;}this.userSelect(_22,_23,e.shiftKey);},onMouseUp:function(e){if(!this._doDeselect){return;}this._doDeselect=false;this.userSelect(this.current,_2.isCopyKey(e),e.shiftKey);},onMouseMove:function(){this._doDeselect=false;},_compareNodes:function(n1,n2){if(n1===n2){return 0;}if("sourceIndex" in document.documentElement){return n1.sourceIndex-n2.sourceIndex;}else{if("compareDocumentPosition" in document.documentElement){return n1.compareDocumentPosition(n2)&2?1:-1;}else{if(document.createRange){var r1=doc.createRange();r1.setStartBefore(n1);var r2=doc.createRange();r2.setStartBefore(n2);return r1.compareBoundaryPoints(r1.END_TO_END,r2);}else{throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");}}}},userSelect:function(_24,_25,_26){if(this.singular){if(this.anchor==_24&&_25){this.selectNone();}else{this.setSelection([_24]);this.anchor=_24;}}else{if(_26&&this.anchor){var cr=this._compareNodes(this.anchor.rowNode,_24.rowNode),_27,end,_28=this.anchor;if(cr<0){_27=_28;end=_24;}else{_27=_24;end=_28;}var _29=[];while(_27!=end){_29.push(_27);_27=this.tree._getNextNode(_27);}_29.push(end);this.setSelection(_29);}else{if(this.selection[_24.id]&&_25){this.removeTreeNode(_24);}else{if(_25){this.addTreeNode(_24,true);}else{this.setSelection([_24]);this.anchor=_24;}}}}},getItem:function(key){var _2a=this.selection[key];return {data:_2a,type:["treeNode"]};},forInSelectedItems:function(f,o){o=o||_5.global;for(var id in this.selection){f.call(o,this.getItem(id),id,this);}}});}); \ No newline at end of file
+define("dijit/tree/_dndSelector",["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/dnd/common","dojo/dom","dojo/mouse","dojo/on","dojo/touch","../a11yclick","./_dndContainer"],function(_1,_2,_3,_4,_5,_6,_7,on,_8,_9,_a){return _2("dijit.tree._dndSelector",_a,{constructor:function(){this.selection={};this.anchor=null;this.events.push(on(this.tree.domNode,_8.press,_4.hitch(this,"onMouseDown")),on(this.tree.domNode,_8.release,_4.hitch(this,"onMouseUp")),on(this.tree.domNode,_8.move,_4.hitch(this,"onMouseMove")),on(this.tree.domNode,_9.press,_4.hitch(this,"onClickPress")),on(this.tree.domNode,_9.release,_4.hitch(this,"onClickRelease")));},singular:false,getSelectedTreeNodes:function(){var _b=[],_c=this.selection;for(var i in _c){_b.push(_c[i]);}return _b;},selectNone:function(){this.setSelection([]);return this;},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null;},addTreeNode:function(_d,_e){this.setSelection(this.getSelectedTreeNodes().concat([_d]));if(_e){this.anchor=_d;}return _d;},removeTreeNode:function(_f){var _10=_1.filter(this.getSelectedTreeNodes(),function(_11){return !_6.isDescendant(_11.domNode,_f.domNode);});this.setSelection(_10);return _f;},isTreeNodeSelected:function(_12){return _12.id&&!!this.selection[_12.id];},setSelection:function(_13){var _14=this.getSelectedTreeNodes();_1.forEach(this._setDifference(_14,_13),_4.hitch(this,function(_15){_15.setSelected(false);if(this.anchor==_15){delete this.anchor;}delete this.selection[_15.id];}));_1.forEach(this._setDifference(_13,_14),_4.hitch(this,function(_16){_16.setSelected(true);this.selection[_16.id]=_16;}));this._updateSelectionProperties();},_setDifference:function(xs,ys){_1.forEach(ys,function(y){y.__exclude__=true;});var ret=_1.filter(xs,function(x){return !x.__exclude__;});_1.forEach(ys,function(y){delete y["__exclude__"];});return ret;},_updateSelectionProperties:function(){var _17=this.getSelectedTreeNodes();var _18=[],_19=[];_1.forEach(_17,function(_1a){var ary=_1a.getTreePath();_19.push(_1a);_18.push(ary);},this);var _1b=_1.map(_19,function(_1c){return _1c.item;});this.tree._set("paths",_18);this.tree._set("path",_18[0]||[]);this.tree._set("selectedNodes",_19);this.tree._set("selectedNode",_19[0]||null);this.tree._set("selectedItems",_1b);this.tree._set("selectedItem",_1b[0]||null);},onClickPress:function(e){if(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(e.target,this.current)){return;}if(e.type=="mousedown"&&_7.isLeft(e)){e.preventDefault();}var _1d=e.type=="keydown"?this.tree.focusedChild:this.current;if(!_1d){return;}var _1e=_5.getCopyKeyState(e),id=_1d.id;if(!this.singular&&!e.shiftKey&&this.selection[id]){this._doDeselect=true;return;}else{this._doDeselect=false;}this.userSelect(_1d,_1e,e.shiftKey);},onClickRelease:function(e){if(!this._doDeselect){return;}this._doDeselect=false;this.userSelect(e.type=="keyup"?this.tree.focusedChild:this.current,_5.getCopyKeyState(e),e.shiftKey);},onMouseMove:function(){this._doDeselect=false;},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(n1,n2){if(n1===n2){return 0;}if("sourceIndex" in document.documentElement){return n1.sourceIndex-n2.sourceIndex;}else{if("compareDocumentPosition" in document.documentElement){return n1.compareDocumentPosition(n2)&2?1:-1;}else{if(document.createRange){var r1=doc.createRange();r1.setStartBefore(n1);var r2=doc.createRange();r2.setStartBefore(n2);return r1.compareBoundaryPoints(r1.END_TO_END,r2);}else{throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");}}}},userSelect:function(_1f,_20,_21){if(this.singular){if(this.anchor==_1f&&_20){this.selectNone();}else{this.setSelection([_1f]);this.anchor=_1f;}}else{if(_21&&this.anchor){var cr=this._compareNodes(this.anchor.rowNode,_1f.rowNode),_22,end,_23=this.anchor;if(cr<0){_22=_23;end=_1f;}else{_22=_1f;end=_23;}var _24=[];while(_22!=end){_24.push(_22);_22=this.tree._getNext(_22);}_24.push(end);this.setSelection(_24);}else{if(this.selection[_1f.id]&&_20){this.removeTreeNode(_1f);}else{if(_20){this.addTreeNode(_1f,true);}else{this.setSelection([_1f]);this.anchor=_1f;}}}}},getItem:function(key){var _25=this.selection[key];return {data:_25,type:["treeNode"]};},forInSelectedItems:function(f,o){o=o||_3.global;for(var id in this.selection){f.call(o,this.getItem(id),id,this);}}});}); \ No newline at end of file
diff --git a/lib/dijit/tree/dndSource.js b/lib/dijit/tree/dndSource.js
index 7698cd844..6aab36137 100644
--- a/lib/dijit/tree/dndSource.js
+++ b/lib/dijit/tree/dndSource.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/tree/dndSource",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/_base/lang","dojo/on","dojo/touch","dojo/topic","dojo/dnd/Manager","./_dndSelector"],function(_1,_2,_3,_4,_5,_6,on,_7,_8,_9,_a){var _b=_3("dijit.tree.dndSource",_a,{isSource:true,accept:["text","treeNode"],copyOnly:false,dragThreshold:5,betweenThreshold:0,generateText:true,constructor:function(_c,_d){if(!_d){_d={};}_6.mixin(this,_d);var _e=_d.accept instanceof Array?_d.accept:["text","treeNode"];this.accept=null;if(_e.length){this.accept={};for(var i=0;i<_e.length;++i){this.accept[_e[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.dropPosition="";this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_4.add(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_4.add(this.node,"dojoDndTarget");}this.topics=[_8.subscribe("/dnd/source/over",_6.hitch(this,"onDndSourceOver")),_8.subscribe("/dnd/start",_6.hitch(this,"onDndStart")),_8.subscribe("/dnd/drop",_6.hitch(this,"onDndDrop")),_8.subscribe("/dnd/cancel",_6.hitch(this,"onDndCancel"))];},checkAcceptance:function(){return true;},copyState:function(_f){return this.copyOnly||_f;},destroy:function(){this.inherited(arguments);var h;while(h=this.topics.pop()){h.remove();}this.targetAnchor=null;},_onDragMouse:function(e,_10){var m=_9.manager(),_11=this.targetAnchor,_12=this.current,_13=this.dropPosition;var _14="Over";if(_12&&this.betweenThreshold>0){if(!this.targetBox||_11!=_12){this.targetBox=_5.position(_12.rowNode,true);}if((e.pageY-this.targetBox.y)<=this.betweenThreshold){_14="Before";}else{if((e.pageY-this.targetBox.y)>=(this.targetBox.h-this.betweenThreshold)){_14="After";}}}if(_10||_12!=_11||_14!=_13){if(_11){this._removeItemClass(_11.rowNode,_13);}if(_12){this._addItemClass(_12.rowNode,_14);}if(!_12){m.canDrop(false);}else{if(_12==this.tree.rootNode&&_14!="Over"){m.canDrop(false);}else{var _15=false;if(m.source==this){for(var _16 in this.selection){var _17=this.selection[_16];if(_17.item===_12.item){_15=true;break;}}}if(_15){m.canDrop(false);}else{if(this.checkItemAcceptance(_12.rowNode,m.source,_14.toLowerCase())&&!this._isParentChildDrop(m.source,_12.rowNode)){m.canDrop(true);}else{m.canDrop(false);}}}}this.targetAnchor=_12;this.dropPosition=_14;}},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}this.inherited(arguments);var m=_9.manager();if(this.isDragging){this._onDragMouse(e);}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>=this.dragThreshold||Math.abs(e.pageY-this._lastY)>=this.dragThreshold)){var _18=this.getSelectedTreeNodes();if(_18.length){if(_18.length>1){var _19=this.selection,i=0,r=[],n,p;nextitem:while((n=_18[i++])){for(p=n.getParent();p&&p!==this.tree;p=p.getParent()){if(_19[p.id]){continue nextitem;}}r.push(n);}_18=r;}_18=_1.map(_18,function(n){return n.domNode;});m.startDrag(this,_18,this.copyState(_2.isCopyKey(e)));this._onDragMouse(e,true);}}}},onMouseDown:function(e){this.mouseDown=true;this.mouseButton=e.button;this._lastX=e.pageX;this._lastY=e.pageY;this.inherited(arguments);},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;this.inherited(arguments);}},onMouseOut:function(){this.inherited(arguments);this._unmarkTargetAnchor();},checkItemAcceptance:function(){return true;},onDndSourceOver:function(_1a){if(this!=_1a){this.mouseDown=false;this._unmarkTargetAnchor();}else{if(this.isDragging){var m=_9.manager();m.canDrop(false);}}},onDndStart:function(_1b,_1c,_1d){if(this.isSource){this._changeState("Source",this==_1b?(_1d?"Copied":"Moved"):"");}var _1e=this.checkAcceptance(_1b,_1c);this._changeState("Target",_1e?"":"Disabled");if(this==_1b){_9.manager().overSource(this);}this.isDragging=true;},itemCreator:function(_1f){return _1.map(_1f,function(_20){return {"id":_20.id,"name":_20.textContent||_20.innerText||""};});},onDndDrop:function(_21,_22,_23){if(this.containerState=="Over"){var _24=this.tree,_25=_24.model,_26=this.targetAnchor;this.isDragging=false;var _27;var _28;var _29;_27=(_26&&_26.item)||_24.item;if(this.dropPosition=="Before"||this.dropPosition=="After"){_27=(_26.getParent()&&_26.getParent().item)||_24.item;_28=_26.getIndexInParent();if(this.dropPosition=="After"){_28=_26.getIndexInParent()+1;_29=_26.getNextSibling()&&_26.getNextSibling().item;}else{_29=_26.item;}}else{_27=(_26&&_26.item)||_24.item;}var _2a;_1.forEach(_22,function(_2b,idx){var _2c=_21.getItem(_2b.id);if(_1.indexOf(_2c.type,"treeNode")!=-1){var _2d=_2c.data,_2e=_2d.item,_2f=_2d.getParent().item;}if(_21==this){if(typeof _28=="number"){if(_27==_2f&&_2d.getIndexInParent()<_28){_28-=1;}}_25.pasteItem(_2e,_2f,_27,_23,_28,_29);}else{if(_25.isItem(_2e)){_25.pasteItem(_2e,_2f,_27,_23,_28,_29);}else{if(!_2a){_2a=this.itemCreator(_22,_26.rowNode,_21);}_25.newItem(_2a[idx],_27,_28,_29);}}},this);this.tree._expandNode(_26);}this.onDndCancel();},onDndCancel:function(){this._unmarkTargetAnchor();this.isDragging=false;this.mouseDown=false;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","");},onOverEvent:function(){this.inherited(arguments);_9.manager().overSource(this);},onOutEvent:function(){this._unmarkTargetAnchor();var m=_9.manager();if(this.isDragging){m.canDrop(false);}m.outSource(this);this.inherited(arguments);},_isParentChildDrop:function(_30,_31){if(!_30.tree||_30.tree!=this.tree){return false;}var _32=_30.tree.domNode;var ids=_30.selection;var _33=_31.parentNode;while(_33!=_32&&!ids[_33.id]){_33=_33.parentNode;}return _33.id&&ids[_33.id];},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor.rowNode,this.dropPosition);this.targetAnchor=null;this.targetBox=null;this.dropPosition=null;},_markDndStatus:function(_34){this._changeState("Source",_34?"Copied":"Moved");}});return _b;}); \ No newline at end of file
+define("dijit/tree/dndSource",["dojo/_base/array","dojo/_base/declare","dojo/dnd/common","dojo/dom-class","dojo/dom-geometry","dojo/_base/lang","dojo/mouse","dojo/on","dojo/touch","dojo/topic","dojo/dnd/Manager","./_dndSelector"],function(_1,_2,_3,_4,_5,_6,_7,on,_8,_9,_a,_b){var _c=_2("dijit.tree.dndSource",_b,{isSource:true,accept:["text","treeNode"],copyOnly:false,dragThreshold:5,betweenThreshold:0,generateText:true,constructor:function(_d,_e){if(!_e){_e={};}_6.mixin(this,_e);var _f=_e.accept instanceof Array?_e.accept:["text","treeNode"];this.accept=null;if(_f.length){this.accept={};for(var i=0;i<_f.length;++i){this.accept[_f[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.dropPosition="";this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_4.add(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_4.add(this.node,"dojoDndTarget");}this.topics=[_9.subscribe("/dnd/source/over",_6.hitch(this,"onDndSourceOver")),_9.subscribe("/dnd/start",_6.hitch(this,"onDndStart")),_9.subscribe("/dnd/drop",_6.hitch(this,"onDndDrop")),_9.subscribe("/dnd/cancel",_6.hitch(this,"onDndCancel"))];},checkAcceptance:function(){return true;},copyState:function(_10){return this.copyOnly||_10;},destroy:function(){this.inherited(arguments);var h;while(h=this.topics.pop()){h.remove();}this.targetAnchor=null;},_onDragMouse:function(e,_11){var m=_a.manager(),_12=this.targetAnchor,_13=this.current,_14=this.dropPosition;var _15="Over";if(_13&&this.betweenThreshold>0){if(!this.targetBox||_12!=_13){this.targetBox=_5.position(_13.rowNode,true);}if((e.pageY-this.targetBox.y)<=this.betweenThreshold){_15="Before";}else{if((e.pageY-this.targetBox.y)>=(this.targetBox.h-this.betweenThreshold)){_15="After";}}}if(_11||_13!=_12||_15!=_14){if(_12){this._removeItemClass(_12.rowNode,_14);}if(_13){this._addItemClass(_13.rowNode,_15);}if(!_13){m.canDrop(false);}else{if(_13==this.tree.rootNode&&_15!="Over"){m.canDrop(false);}else{var _16=false,_17=false;if(m.source==this){_17=(_15==="Over");for(var _18 in this.selection){var _19=this.selection[_18];if(_19.item===_13.item){_16=true;break;}if(_19.getParent().id!==_13.id){_17=false;}}}m.canDrop(!_16&&!_17&&!this._isParentChildDrop(m.source,_13.rowNode)&&this.checkItemAcceptance(_13.rowNode,m.source,_15.toLowerCase()));}}this.targetAnchor=_13;this.dropPosition=_15;}},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}this.inherited(arguments);var m=_a.manager();if(this.isDragging){this._onDragMouse(e);}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>=this.dragThreshold||Math.abs(e.pageY-this._lastY)>=this.dragThreshold)){var _1a=this.getSelectedTreeNodes();if(_1a.length){if(_1a.length>1){var _1b=this.selection,i=0,r=[],n,p;nextitem:while((n=_1a[i++])){for(p=n.getParent();p&&p!==this.tree;p=p.getParent()){if(_1b[p.id]){continue nextitem;}}r.push(n);}_1a=r;}_1a=_1.map(_1a,function(n){return n.domNode;});m.startDrag(this,_1a,this.copyState(_3.getCopyKeyState(e)));this._onDragMouse(e,true);}}}},onMouseDown:function(e){if(e.type=="touchstart"||_7.isLeft(e)){this.mouseDown=true;this.mouseButton=e.button;this._lastX=e.pageX;this._lastY=e.pageY;}this.inherited(arguments);},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;this.inherited(arguments);}},onMouseOut:function(){this.inherited(arguments);this._unmarkTargetAnchor();},checkItemAcceptance:function(){return true;},onDndSourceOver:function(_1c){if(this!=_1c){this.mouseDown=false;this._unmarkTargetAnchor();}else{if(this.isDragging){var m=_a.manager();m.canDrop(false);}}},onDndStart:function(_1d,_1e,_1f){if(this.isSource){this._changeState("Source",this==_1d?(_1f?"Copied":"Moved"):"");}var _20=this.checkAcceptance(_1d,_1e);this._changeState("Target",_20?"":"Disabled");if(this==_1d){_a.manager().overSource(this);}this.isDragging=true;},itemCreator:function(_21){return _1.map(_21,function(_22){return {"id":_22.id,"name":_22.textContent||_22.innerText||""};});},onDndDrop:function(_23,_24,_25){if(this.containerState=="Over"){var _26=this.tree,_27=_26.model,_28=this.targetAnchor,_29=false;this.isDragging=false;var _2a;var _2b;var _2c;_2a=(_28&&_28.item)||_26.item;if(this.dropPosition=="Before"||this.dropPosition=="After"){_2a=(_28.getParent()&&_28.getParent().item)||_26.item;_2b=_28.getIndexInParent();if(this.dropPosition=="After"){_2b=_28.getIndexInParent()+1;_2c=_28.getNextSibling()&&_28.getNextSibling().item;}else{_2c=_28.item;}}else{_2a=(_28&&_28.item)||_26.item;_29=true;}var _2d;_1.forEach(_24,function(_2e,idx){var _2f=_23.getItem(_2e.id);if(_1.indexOf(_2f.type,"treeNode")!=-1){var _30=_2f.data,_31=_30.item,_32=_30.getParent().item;}if(_23==this){if(typeof _2b=="number"){if(_2a==_32&&_30.getIndexInParent()<_2b){_2b-=1;}}_27.pasteItem(_31,_32,_2a,_25,_2b,_2c);}else{if(_27.isItem(_31)){_27.pasteItem(_31,_32,_2a,_25,_2b,_2c);}else{if(!_2d){_2d=this.itemCreator(_24,_28.rowNode,_23);}_27.newItem(_2d[idx],_2a,_2b,_2c);}}},this);if(_29){this.tree._expandNode(_28);}}this.onDndCancel();},onDndCancel:function(){this._unmarkTargetAnchor();this.isDragging=false;this.mouseDown=false;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","");},onOverEvent:function(){this.inherited(arguments);_a.manager().overSource(this);},onOutEvent:function(){this._unmarkTargetAnchor();var m=_a.manager();if(this.isDragging){m.canDrop(false);}m.outSource(this);this.inherited(arguments);},_isParentChildDrop:function(_33,_34){if(!_33.tree||_33.tree!=this.tree){return false;}var _35=_33.tree.domNode;var ids=_33.selection;var _36=_34.parentNode;while(_36!=_35&&!ids[_36.id]){_36=_36.parentNode;}return _36.id&&ids[_36.id];},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor.rowNode,this.dropPosition);this.targetAnchor=null;this.targetBox=null;this.dropPosition=null;},_markDndStatus:function(_37){this._changeState("Source",_37?"Copied":"Moved");}});return _c;}); \ No newline at end of file
diff --git a/lib/dijit/tree/model.js b/lib/dijit/tree/model.js
index 69cd9b307..54364c0a6 100644
--- a/lib/dijit/tree/model.js
+++ b/lib/dijit/tree/model.js
@@ -1,2 +1,2 @@
//>>built
-define("dijit/tree/model",["dojo/_base/declare"],function(_1){return _1("dijit.tree.model",null,{destroy:function(){},getRoot:function(_2){},mayHaveChildren:function(_3){},getChildren:function(_4,_5){},isItem:function(_6){},fetchItemByIdentity:function(_7){},getIdentity:function(_8){},getLabel:function(_9){},newItem:function(_a,_b,_c,_d){},pasteItem:function(_e,_f,_10,_11,_12,_13){},onChange:function(_14){},onChildrenChange:function(_15,_16){}});}); \ No newline at end of file
+define("dijit/tree/model",["dojo/_base/declare"],function(_1){return _1("dijit.tree.model",null,{destroy:function(){},getRoot:function(_2){},mayHaveChildren:function(_3){},getChildren:function(_4,_5){},isItem:function(_6){},getIdentity:function(_7){},getLabel:function(_8){},newItem:function(_9,_a,_b,_c){},pasteItem:function(_d,_e,_f,_10,_11,_12){},onChange:function(_13){},onChildrenChange:function(_14,_15){}});}); \ No newline at end of file