Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / CardLayout.html
index 5ee808f..83460b5 100644 (file)
@@ -1,11 +1,17 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.layout.CardLayout"></div>/**\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.layout.CardLayout"></div>/**\r
  * @class Ext.layout.CardLayout\r
  * @extends Ext.layout.FitLayout\r
  * <p>This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be\r
@@ -107,10 +113,11 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
             if(this.activeItem){\r
                 this.activeItem.hide();\r
             }\r
+            var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered);\r
             this.activeItem = item;\r
             item.show();\r
-            this.container.doLayout();\r
-            if(this.layoutOnCardChange && item.doLayout){\r
+            this.layout();\r
+            if(layout){\r
                 item.doLayout();\r
             }\r
         }\r
@@ -125,6 +132,6 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
         }\r
     }\r
 });\r
-Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;</pre>    \r
-</body>\r
+Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;</pre>
+</body>
 </html>
\ No newline at end of file