1 2 3 4 | dojo.extend(dijit.Dialog, { templateString: dojo.cache("dojoCustom", "templates/Dialog.html") }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | _size: function(){ this._checkIfSingleChild(); if(this._singleChild){ if(typeof this._singleChildOriginalStyle != "undefined"){ this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle; delete this._singleChildOriginalStyle; } }else{ domStyle.set(this.containerNode, { width:"auto", height:"auto" }); } var bb = domGeometry.position(this.domNode); var viewport = winUtils.getBox(this.ownerDocument); viewport.w *= this.maxRatio; viewport.h *= this.maxRatio; if(bb.w >= viewport.w || bb.h >= viewport.h){ var containerSize = domGeometry.position(this.containerNode), w = Math.min(bb.w, viewport.w) - (bb.w - containerSize.w), h = Math.min(bb.h, viewport.h) - (bb.h - containerSize.h); if(this._singleChild && this._singleChild.resize){ if(typeof this._singleChildOriginalStyle == "undefined"){ this._singleChildOriginalStyle = this._singleChild.domNode.style.cssText; } this._singleChild.resize({w: w, h: h}); }else{ domStyle.set(this.containerNode, { width: w + "px", height: h + "px", overflow: "auto", position: "relative" }); } }else{ if(this._singleChild && this._singleChild.resize){ this._singleChild.resize(); } } }, |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | _size: function(){ this._checkIfSingleChild(); if(this._singleChild){ if(this._singleChildOriginalStyle){ this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle; } delete this._singleChildOriginalStyle; }else{ dojo.style(this.containerNode, { width:"auto", height:"auto" }); } var mb = dojo._getMarginSize(this.domNode); var viewport = dojo.window.getBox(); if(mb.w >= viewport.w || mb.h >= viewport.h){ var w = Math.min(mb.w, Math.floor(viewport.w * 0.75)), h = Math.min(mb.h, Math.floor(viewport.h * 0.75)); if(this._singleChild && this._singleChild.resize){ this._singleChildOriginalStyle = this._singleChild.domNode.style.cssText; this._singleChild.resize({w: w, h: h}); }else{ dojo.style(this.containerNode, { width: w + "px", height: h + "px", overflow: "auto", position: "relative" }); } }else{ if(this._singleChild && this._singleChild.resize){ this._singleChild.resize(); } } }, |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |