Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / layout / container / Auto.js
index 67807ce..54ea941 100644 (file)
@@ -1,33 +1,47 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
  * @class Ext.layout.container.Auto
  * @extends Ext.layout.container.Container
  *
- * <p>The AutoLayout is the default layout manager delegated by {@link Ext.container.Container} to
- * render any child Components when no <tt>{@link Ext.container.Container#layout layout}</tt> is configured into
- * a <tt>{@link Ext.container.Container Container}.</tt>.  AutoLayout provides only a passthrough of any layout calls
- * to any child containers.</p>
- * {@img Ext.layout.container.Auto/Ext.layout.container.Auto.png Ext.layout.container.Auto container layout}
- * Example usage:
-       Ext.create('Ext.Panel', {
-               width: 500,
-               height: 280,
-               title: "AutoLayout Panel",
-               layout: 'auto',
-               renderTo: document.body,
-               items: [{
-                       xtype: 'panel',
-                       title: 'Top Inner Panel',
-                       width: '75%',
-                       height: 90
-               },{
-                       xtype: 'panel',
-                       title: 'Bottom Inner Panel',
-                       width: '75%',
-                       height: 90
-               }]
-       });
+ * The AutoLayout is the default layout manager delegated by {@link Ext.container.Container} to
+ * render any child Components when no `{@link Ext.container.Container#layout layout}` is configured into
+ * a `{@link Ext.container.Container Container}.` AutoLayout provides only a passthrough of any layout calls
+ * to any child containers.
+ *
+ *     @example
+ *     Ext.create('Ext.Panel', {
+ *         width: 500,
+ *         height: 280,
+ *         title: "AutoLayout Panel",
+ *         layout: 'auto',
+ *         renderTo: document.body,
+ *         items: [{
+ *             xtype: 'panel',
+ *             title: 'Top Inner Panel',
+ *             width: '75%',
+ *             height: 90
+ *         },
+ *         {
+ *             xtype: 'panel',
+ *             title: 'Bottom Inner Panel',
+ *             width: '75%',
+ *             height: 90
+ *         }]
+ *     });
  */
-
 Ext.define('Ext.layout.container.Auto', {
 
     /* Begin Definitions */
@@ -40,8 +54,6 @@ Ext.define('Ext.layout.container.Auto', {
 
     type: 'autocontainer',
 
-    fixedLayout: false,
-
     bindToOwnerCtComponent: true,
 
     // @private
@@ -68,5 +80,13 @@ Ext.define('Ext.layout.container.Auto', {
                 me.setItemSize(items[i]);
             }
         }
+    },
+
+    configureItem: function(item) {
+        this.callParent(arguments);
+
+        // Auto layout does not manage any dimensions.
+        item.layoutManagedHeight = 2;
+        item.layoutManagedWidth = 2;
     }
-});
\ No newline at end of file
+});