X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/source/Auto.html diff --git a/docs/source/Auto.html b/docs/source/Auto.html index 500e3414..f98a410b 100644 --- a/docs/source/Auto.html +++ b/docs/source/Auto.html @@ -3,8 +3,8 @@ The source code - - + + @@ -15,86 +15,29 @@ -
/**
- * @class Ext.layout.container.Auto
- * @extends Ext.layout.container.Container
+  
/**
+ * @class Ext.layout.component.Auto
+ * @extends Ext.layout.component.Component
+ * @private
  *
- * <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
-		}]
-	});
+ * <p>The AutoLayout is the default layout manager delegated by {@link Ext.Component} to
+ * render any child Elements when no <tt>{@link Ext.container.Container#layout layout}</tt> is configured.</p>
  */
 
-Ext.define('Ext.layout.container.Auto', {
+Ext.define('Ext.layout.component.Auto', {
 
     /* Begin Definitions */
 
-    alias: ['layout.auto', 'layout.autocontainer'],
+    alias: 'layout.autocomponent',
 
-    extend: 'Ext.layout.container.Container',
+    extend: 'Ext.layout.component.Component',
 
     /* End Definitions */
 
-    type: 'autocontainer',
+    type: 'autocomponent',
 
-    bindToOwnerCtComponent: true,
-
-    // @private
-    onLayout : function(owner, target) {
-        var me = this,
-            items = me.getLayoutItems(),
-            ln = items.length,
-            i;
-
-        // Ensure the Container is only primed with the clear element if there are child items.
-        if (ln) {
-            // Auto layout uses natural HTML flow to arrange the child items.
-            // To ensure that all browsers (I'm looking at you IE!) add the bottom margin of the last child to the
-            // containing element height, we create a zero-sized element with style clear:both to force a "new line"
-            if (!me.clearEl) {
-                me.clearEl = me.getRenderTarget().createChild({
-                    cls: Ext.baseCSSPrefix + 'clear',
-                    role: 'presentation'
-                });
-            }
-
-            // Auto layout allows CSS to size its child items.
-            for (i = 0; i < ln; i++) {
-                me.setItemSize(items[i]);
-            }
-        }
-    },
-
-    configureItem: function(item) {
-
-        // Auto layout does not manage any dimensions.
-        // We have to check our type, because this could be called as a superclass method in a subclass
-        if (this.type === 'autocontainer') {
-            item.layoutManagedHeight = 2;
-            item.layoutManagedWidth = 2;
-        }
-
-        this.callParent(arguments);
+    onLayout : function(width, height) {
+        this.setTargetSize(width, height);
     }
 });