X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FBorderLayout.js;h=aeda210f7c200362e509c851de83886ab41bfa94;hb=61bc45258e16a779856dd2ad0862630b489e4583;hp=701d979dca0c2bfcb76f682a57ab2acf14dbc42a;hpb=a77296461f63168d77465492d96928e4d3b7b1ba;p=roojs1 diff --git a/Roo/BorderLayout.js b/Roo/BorderLayout.js index 701d979dca..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; @@ -470,9 +472,17 @@ layout.addxtype({ - default: - alert("Can not add '" + cfg.xtype + "' to BorderLayout"); - return null; + 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; + } + // GridPanel (grid, cfg) }