]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dijit/place.js
upgrade dojo to 1.8.3 (refs #570)
[tt-rss.git] / lib / dijit / place.js
index 7808c6e05eba1fece0960bd06794eb7ca3a4fa63..e7a28647d5dc168ecaddb1893ed7ca74fdf58eac 100644 (file)
@@ -1,2 +1,2 @@
 //>>built
-define("dijit/place",["dojo/_base/array","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/window","dojo/window","."],function(_1,_2,_3,_4,_5,_6,_7){function _8(_9,_a,_b,_c){var _d=_6.getBox();if(!_9.parentNode||String(_9.parentNode.tagName).toLowerCase()!="body"){_5.body().appendChild(_9);}var _e=null;_1.some(_a,function(_f){var _10=_f.corner;var pos=_f.pos;var _11=0;var _12={w:{"L":_d.l+_d.w-pos.x,"R":pos.x-_d.l,"M":_d.w}[_10.charAt(1)],h:{"T":_d.t+_d.h-pos.y,"B":pos.y-_d.t,"M":_d.h}[_10.charAt(0)]};if(_b){var res=_b(_9,_f.aroundCorner,_10,_12,_c);_11=typeof res=="undefined"?0:res;}var _13=_9.style;var _14=_13.display;var _15=_13.visibility;if(_13.display=="none"){_13.visibility="hidden";_13.display="";}var mb=_2.getMarginBox(_9);_13.display=_14;_13.visibility=_15;var _16={"L":pos.x,"R":pos.x-mb.w,"M":Math.max(_d.l,Math.min(_d.l+_d.w,pos.x+(mb.w>>1))-mb.w)}[_10.charAt(1)],_17={"T":pos.y,"B":pos.y-mb.h,"M":Math.max(_d.t,Math.min(_d.t+_d.h,pos.y+(mb.h>>1))-mb.h)}[_10.charAt(0)],_18=Math.max(_d.l,_16),_19=Math.max(_d.t,_17),_1a=Math.min(_d.l+_d.w,_16+mb.w),_1b=Math.min(_d.t+_d.h,_17+mb.h),_1c=_1a-_18,_1d=_1b-_19;_11+=(mb.w-_1c)+(mb.h-_1d);if(_e==null||_11<_e.overflow){_e={corner:_10,aroundCorner:_f.aroundCorner,x:_18,y:_19,w:_1c,h:_1d,overflow:_11,spaceAvailable:_12};}return !_11;});if(_e.overflow&&_b){_b(_9,_e.aroundCorner,_e.corner,_e.spaceAvailable,_c);}var l=_2.isBodyLtr(),s=_9.style;s.top=_e.y+"px";s[l?"left":"right"]=(l?_e.x:_d.w-_e.x-_e.w)+"px";s[l?"right":"left"]="auto";return _e;};return (_7.place={at:function(_1e,pos,_1f,_20){var _21=_1.map(_1f,function(_22){var c={corner:_22,pos:{x:pos.x,y:pos.y}};if(_20){c.pos.x+=_22.charAt(1)=="L"?_20.x:-_20.x;c.pos.y+=_22.charAt(0)=="T"?_20.y:-_20.y;}return c;});return _8(_1e,_21);},around:function(_23,_24,_25,_26,_27){var _28=(typeof _24=="string"||"offsetWidth" in _24)?_2.position(_24,true):_24;if(_24.parentNode){var _29=_24.parentNode;while(_29&&_29.nodeType==1&&_29.nodeName!="BODY"){var _2a=_2.position(_29,true);var _2b=_3.getComputedStyle(_29).overflow;if(_2b=="hidden"||_2b=="auto"||_2b=="scroll"){var _2c=Math.min(_28.y+_28.h,_2a.y+_2a.h);var _2d=Math.min(_28.x+_28.w,_2a.x+_2a.w);_28.x=Math.max(_28.x,_2a.x);_28.y=Math.max(_28.y,_2a.y);_28.h=_2c-_28.y;_28.w=_2d-_28.x;}_29=_29.parentNode;}}var x=_28.x,y=_28.y,_2e="w" in _28?_28.w:(_28.w=_28.width),_2f="h" in _28?_28.h:(_4.deprecated("place.around: dijit.place.__Rectangle: { x:"+x+", y:"+y+", height:"+_28.height+", width:"+_2e+" } has been deprecated.  Please use { x:"+x+", y:"+y+", h:"+_28.height+", w:"+_2e+" }","","2.0"),_28.h=_28.height);var _30=[];function _31(_32,_33){_30.push({aroundCorner:_32,corner:_33,pos:{x:{"L":x,"R":x+_2e,"M":x+(_2e>>1)}[_32.charAt(1)],y:{"T":y,"B":y+_2f,"M":y+(_2f>>1)}[_32.charAt(0)]}});};_1.forEach(_25,function(pos){var ltr=_26;switch(pos){case "above-centered":_31("TM","BM");break;case "below-centered":_31("BM","TM");break;case "after-centered":ltr=!ltr;case "before-centered":_31(ltr?"ML":"MR",ltr?"MR":"ML");break;case "after":ltr=!ltr;case "before":_31(ltr?"TL":"TR",ltr?"TR":"TL");_31(ltr?"BL":"BR",ltr?"BR":"BL");break;case "below-alt":ltr=!ltr;case "below":_31(ltr?"BL":"BR",ltr?"TL":"TR");_31(ltr?"BR":"BL",ltr?"TR":"TL");break;case "above-alt":ltr=!ltr;case "above":_31(ltr?"TL":"TR",ltr?"BL":"BR");_31(ltr?"TR":"TL",ltr?"BR":"BL");break;default:_31(pos.aroundCorner,pos.corner);}});var _34=_8(_23,_30,_27,{w:_2e,h:_2f});_34.aroundNodePos=_28;return _34;}});});
\ No newline at end of file
+define("dijit/place",["dojo/_base/array","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/window","dojo/window","./main"],function(_1,_2,_3,_4,_5,_6,_7){function _8(_9,_a,_b,_c){var _d=_6.getBox(_9.ownerDocument);if(!_9.parentNode||String(_9.parentNode.tagName).toLowerCase()!="body"){_5.body(_9.ownerDocument).appendChild(_9);}var _e=null;_1.some(_a,function(_f){var _10=_f.corner;var pos=_f.pos;var _11=0;var _12={w:{"L":_d.l+_d.w-pos.x,"R":pos.x-_d.l,"M":_d.w}[_10.charAt(1)],h:{"T":_d.t+_d.h-pos.y,"B":pos.y-_d.t,"M":_d.h}[_10.charAt(0)]};var s=_9.style;s.left=s.right="auto";if(_b){var res=_b(_9,_f.aroundCorner,_10,_12,_c);_11=typeof res=="undefined"?0:res;}var _13=_9.style;var _14=_13.display;var _15=_13.visibility;if(_13.display=="none"){_13.visibility="hidden";_13.display="";}var bb=_2.position(_9);_13.display=_14;_13.visibility=_15;var _16={"L":pos.x,"R":pos.x-bb.w,"M":Math.max(_d.l,Math.min(_d.l+_d.w,pos.x+(bb.w>>1))-bb.w)}[_10.charAt(1)],_17={"T":pos.y,"B":pos.y-bb.h,"M":Math.max(_d.t,Math.min(_d.t+_d.h,pos.y+(bb.h>>1))-bb.h)}[_10.charAt(0)],_18=Math.max(_d.l,_16),_19=Math.max(_d.t,_17),_1a=Math.min(_d.l+_d.w,_16+bb.w),_1b=Math.min(_d.t+_d.h,_17+bb.h),_1c=_1a-_18,_1d=_1b-_19;_11+=(bb.w-_1c)+(bb.h-_1d);if(_e==null||_11<_e.overflow){_e={corner:_10,aroundCorner:_f.aroundCorner,x:_18,y:_19,w:_1c,h:_1d,overflow:_11,spaceAvailable:_12};}return !_11;});if(_e.overflow&&_b){_b(_9,_e.aroundCorner,_e.corner,_e.spaceAvailable,_c);}var l=_2.isBodyLtr(_9.ownerDocument),s=_9.style;s.top=_e.y+"px";s[l?"left":"right"]=(l?_e.x:_d.w-_e.x-_e.w)+"px";s[l?"right":"left"]="auto";return _e;};var _1e={at:function(_1f,pos,_20,_21){var _22=_1.map(_20,function(_23){var c={corner:_23,pos:{x:pos.x,y:pos.y}};if(_21){c.pos.x+=_23.charAt(1)=="L"?_21.x:-_21.x;c.pos.y+=_23.charAt(0)=="T"?_21.y:-_21.y;}return c;});return _8(_1f,_22);},around:function(_24,_25,_26,_27,_28){var _29=(typeof _25=="string"||"offsetWidth" in _25)?_2.position(_25,true):_25;if(_25.parentNode){var _2a=_3.getComputedStyle(_25).position=="absolute";var _2b=_25.parentNode;while(_2b&&_2b.nodeType==1&&_2b.nodeName!="BODY"){var _2c=_2.position(_2b,true),pcs=_3.getComputedStyle(_2b);if(/relative|absolute/.test(pcs.position)){_2a=false;}if(!_2a&&/hidden|auto|scroll/.test(pcs.overflow)){var _2d=Math.min(_29.y+_29.h,_2c.y+_2c.h);var _2e=Math.min(_29.x+_29.w,_2c.x+_2c.w);_29.x=Math.max(_29.x,_2c.x);_29.y=Math.max(_29.y,_2c.y);_29.h=_2d-_29.y;_29.w=_2e-_29.x;}if(pcs.position=="absolute"){_2a=true;}_2b=_2b.parentNode;}}var x=_29.x,y=_29.y,_2f="w" in _29?_29.w:(_29.w=_29.width),_30="h" in _29?_29.h:(_4.deprecated("place.around: dijit/place.__Rectangle: { x:"+x+", y:"+y+", height:"+_29.height+", width:"+_2f+" } has been deprecated.  Please use { x:"+x+", y:"+y+", h:"+_29.height+", w:"+_2f+" }","","2.0"),_29.h=_29.height);var _31=[];function _32(_33,_34){_31.push({aroundCorner:_33,corner:_34,pos:{x:{"L":x,"R":x+_2f,"M":x+(_2f>>1)}[_33.charAt(1)],y:{"T":y,"B":y+_30,"M":y+(_30>>1)}[_33.charAt(0)]}});};_1.forEach(_26,function(pos){var ltr=_27;switch(pos){case "above-centered":_32("TM","BM");break;case "below-centered":_32("BM","TM");break;case "after-centered":ltr=!ltr;case "before-centered":_32(ltr?"ML":"MR",ltr?"MR":"ML");break;case "after":ltr=!ltr;case "before":_32(ltr?"TL":"TR",ltr?"TR":"TL");_32(ltr?"BL":"BR",ltr?"BR":"BL");break;case "below-alt":ltr=!ltr;case "below":_32(ltr?"BL":"BR",ltr?"TL":"TR");_32(ltr?"BR":"BL",ltr?"TR":"TL");break;case "above-alt":ltr=!ltr;case "above":_32(ltr?"TL":"TR",ltr?"BL":"BR");_32(ltr?"TR":"TL",ltr?"BR":"BL");break;default:_32(pos.aroundCorner,pos.corner);}});var _35=_8(_24,_31,_28,{w:_2f,h:_30});_35.aroundNodePos=_29;return _35;}};return _7.place=_1e;});
\ No newline at end of file