Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / src / layout / component / Tab.js
1 /**
2  * Component layout for tabs
3  * @class Ext.layout.component.Tab
4  * @extends Ext.layout.component.Button
5  * @private
6  */
7 Ext.define('Ext.layout.component.Tab', {
8
9     alias: ['layout.tab'],
10
11     extend: 'Ext.layout.component.Button',
12
13     //type: 'button',
14
15     beforeLayout: function() {
16         var me = this, dirty = me.lastClosable !== me.owner.closable;
17
18         if (dirty) {
19             delete me.adjWidth;
20         }
21
22         return this.callParent(arguments) || dirty;
23     },
24
25     onLayout: function () {
26         var me = this;
27
28         me.callParent(arguments);
29
30         me.lastClosable = me.owner.closable;
31     }
32 });