X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/src/layout/component/Tab.js diff --git a/src/layout/component/Tab.js b/src/layout/component/Tab.js new file mode 100644 index 00000000..9bd606bd --- /dev/null +++ b/src/layout/component/Tab.js @@ -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