Upgrade to ExtJS 3.2.1 - Released 04/27/2010
[extjs.git] / docs / source / AutoLayout.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
4   <title>The source code</title>
5     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
7 </head>
8 <body  onload="prettyPrint();">
9     <pre class="prettyprint lang-js">/*!
10  * Ext JS Library 3.2.1
11  * Copyright(c) 2006-2010 Ext JS, Inc.
12  * licensing@extjs.com
13  * http://www.extjs.com/license
14  */
15 <div id="cls-Ext.layout.AutoLayout"></div>/**
16  * @class Ext.layout.AutoLayout
17  * <p>The AutoLayout is the default layout manager delegated by {@link Ext.Container} to
18  * render any child Components when no <tt>{@link Ext.Container#layout layout}</tt> is configured into
19  * a {@link Ext.Container Container}.</tt>.  AutoLayout provides only a passthrough of any layout calls
20  * to any child containers.</p>
21  */
22 Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, {
23     type: 'auto',
24
25     monitorResize: true,
26
27     onLayout : function(ct, target){
28         Ext.layout.AutoLayout.superclass.onLayout.call(this, ct, target);
29         var cs = this.getRenderedItems(ct), len = cs.length, i, c;
30         for(i = 0; i < len; i++){
31             c = cs[i];
32             if (c.doLayout){
33                 // Shallow layout children
34                 c.doLayout(true);
35             }
36         }
37     }
38 });
39
40 Ext.Container.LAYOUTS['auto'] = Ext.layout.AutoLayout;
41 </pre>    
42 </body>
43 </html>