Roo/BorderLayout.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 13 Dec 2011 06:26:55 +0000 (14:26 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 13 Dec 2011 06:26:55 +0000 (14:26 +0800)
Roo/BorderLayout.js

index 211f9b1..b09b8d0 100644 (file)
@@ -476,13 +476,17 @@ 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] ;
+                }
             }
             
         });