fix layout height calc
[roojs1] / Roo / bootstrap / layout / Border.js
index f2236e8..cc4d8b1 100644 (file)
@@ -25,11 +25,9 @@ the container size if it is not the body element.</b>
  */
 Roo.bootstrap.layout.Border = function(config){
     config = config || {};
+    Roo.bootstrap.layout.Border.superclass.constructor.call(this, config);
     
-    Roo.log('Border construct!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
-    Roo.log(config);
     
-    Roo.bootstrap.layout.Border.superclass.constructor.call(this, config);
     
     Roo.each(Roo.bootstrap.layout.Border.regions, function(region) {
         if(config[region]){
@@ -40,9 +38,12 @@ Roo.bootstrap.layout.Border = function(config){
     
 };
 
-Roo.bootstrap.layout.Border.regions =  ["north","south","east","west","center"];
+Roo.bootstrap.layout.Border.regions =  ["center", "north","south","east","west"];
 
 Roo.extend(Roo.bootstrap.layout.Border, Roo.bootstrap.layout.Manager, {
+    
+    parent : false, // this might point to a 'nest' or a ???
+    
     /**
      * Creates and adds a new region if it doesn't already exist.
      * @param {String} target The target region key (north, south, east, west or center).
@@ -297,13 +298,18 @@ layout.addxtype({
             delete cfg.items;
         }
         var nb = false;
+       
+       if ( region == 'center') {
+           Roo.log("Center: " + cfg.title);
+       }
+       
         
         switch(cfg.xtype) 
         {
             case 'Content':  // ContentPanel (el, cfg)
             case 'Scroll':  // ContentPanel (el, cfg)
             case 'View': 
-                cfg.autoCreate = true;
+                cfg.autoCreate = cfg.autoCreate || true;
                 ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
                 //} else {
                 //    var el = this.el.createChild();