From 273c6e9e91d77b159ea469c0f90811479ffa9fb8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 13 Dec 2011 14:27:28 +0800 Subject: [PATCH] roojs-debug.js --- roojs-debug.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roojs-debug.js b/roojs-debug.js index d69d0f760b..5b4ad606a4 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -44849,29 +44849,33 @@ layout.addxtype({ this.beginUpdate(); // add children.. var region = ''; + var abn = {}; Roo.each(xitems, function(i) { - region = nb && i.region && !i.background ? i.region : false; + region = nb && i.region ? i.region : false; var add = ret.addxtype(i); if (region) { - nb[region] = add; + nb[region] = nb[region] == undefined ? 0 : nb[region]+1; + if (!i.background) { + abn[region] = nb[region] ; + } } }); this.endUpdate(); // make the last non-background panel active.. - //if (nb) { Roo.log(nb); } + if (nb) { Roo.log(anb); } if (nb) { - for(var r in nb) { + for(var r in abn) { region = this.getRegion(r); if (region) { // tried using nb[r], but it does not work.. - if(region.activePanel != nb[r] ) { - region.showPanel(nb[r]); - } + + region.showPanel(abn[r]); + } } } -- 2.39.2