X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FBorderLayout.js;h=aeda210f7c200362e509c851de83886ab41bfa94;hb=dc5d9380aff25134bf025953bdafe40b580337ff;hp=4aec014f4655b7add6bfebe1884b7865b38af86b;hpb=0d2db90014d20756e4fb36321f97ac5576e413da;p=roojs1 diff --git a/Roo/BorderLayout.js b/Roo/BorderLayout.js index 4aec014f46..aeda210f7c 100644 --- a/Roo/BorderLayout.js +++ b/Roo/BorderLayout.js @@ -122,7 +122,9 @@ Roo.extend(Roo.BorderLayout, Roo.LayoutManager, { * Performs a layout update. */ layout : function(){ - if(this.updating) return; + if(this.updating) { + return; + } var size = this.getViewSize(); var w = size.width; var h = size.height; @@ -399,6 +401,7 @@ layout.addxtype({ { case 'ContentPanel': // ContentPanel (el, cfg) case 'ScrollPanel': // ContentPanel (el, cfg) + case 'ViewPanel': if(cfg.autoCreate) { ret = new Roo[cfg.xtype](cfg); // new panel!!!!! } else { @@ -464,12 +467,22 @@ layout.addxtype({ } break; - + + + + + default: + if (typeof(Roo[cfg.xtype]) != 'undefined') { + + ret = new Roo[cfg.xtype](cfg); // new panel!!!!! + this.add(region, ret); + } else { + + alert("Can not add '" + cfg.xtype + "' to BorderLayout"); + return null; + } - default: - alert("Can not add '" + cfg.xtype + "' to BorderLayout"); - return null; // GridPanel (grid, cfg) } @@ -493,7 +506,7 @@ layout.addxtype({ this.endUpdate(); // make the last non-background panel active.. - if (nb) { Roo.log(anb); } + //if (nb) { Roo.log(abn); } if (nb) { for(var r in abn) {