Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / src / layout / component / Tab.js
diff --git a/src/layout/component/Tab.js b/src/layout/component/Tab.js
new file mode 100644 (file)
index 0000000..9bd606b
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * Component layout for tabs
+ * @class Ext.layout.component.Tab
+ * @extends Ext.layout.component.Button
+ * @private
+ */
+Ext.define('Ext.layout.component.Tab', {
+
+    alias: ['layout.tab'],
+
+    extend: 'Ext.layout.component.Button',
+
+    //type: 'button',
+
+    beforeLayout: function() {
+        var me = this, dirty = me.lastClosable !== me.owner.closable;
+
+        if (dirty) {
+            delete me.adjWidth;
+        }
+
+        return this.callParent(arguments) || dirty;
+    },
+
+    onLayout: function () {
+        var me = this;
+
+        me.callParent(arguments);
+
+        me.lastClosable = me.owner.closable;
+    }
+});
\ No newline at end of file