}
if(!this.fitwindow && this.max_width !== 0){
+
var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30);
- // Roo.log(this.bodyEl.getHeight());
- var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 60;
- this.setSize(w,h);
+
+ // for fix height
+ if(this.height) {
+ this.setSize(w, this.height);
+ return;
+ }
+
+ var body_childs = this.bodyEl.dom.childNodes;
+ var full_height = this.headerEl.getHeight() + this.footerEl.getHeight();
+ for(var i = 0; i < body_childs.length; i++) {
+
+ if(body_childs[i].classList.indexOf('roo-layout-region') * 1 != -1) {
+
+ var layout_childs = body_childs[i].childNodes;
+
+ }
+
+ full_height += body_childs[i].offsetHeight;
+ }
+
+ // this.setSize(w, Math.min(full_height, Roo.lib.Dom.getViewportHeight(true) - 60));
}
},