]> git.proxmox.com Git - extjs.git/blame - extjs/packages/core/src/fx/layout/card/Abstract.js
add extjs 6.0.1 sources
[extjs.git] / extjs / packages / core / src / fx / layout / card / Abstract.js
CommitLineData
6527f429
DM
1/**\r
2 * @private\r
3 */\r
4Ext.define('Ext.fx.layout.card.Abstract', {\r
5 extend: 'Ext.Evented',\r
6 isAnimation: true,\r
7\r
8 config: {\r
9 direction: 'left',\r
10\r
11 duration: null,\r
12\r
13 reverse: null,\r
14\r
15 layout: null\r
16 },\r
17\r
18 updateLayout: function(layout) {\r
19 if (layout) {\r
20 this.enable();\r
21 }\r
22 },\r
23\r
24 enable: function() {\r
25 var layout = this.getLayout();\r
26\r
27 if (layout) {\r
28 layout.on('beforeactiveitemchange', 'onActiveItemChange', this);\r
29 }\r
30 },\r
31\r
32 disable: function() {\r
33 var layout = this.getLayout();\r
34\r
35 if (this.isAnimating) {\r
36 this.stopAnimation();\r
37 }\r
38\r
39 if (layout) {\r
40 layout.un('beforeactiveitemchange', 'onActiveItemChange', this);\r
41 }\r
42 },\r
43\r
44 onActiveItemChange: Ext.emptyFn,\r
45\r
46 destroy: function() {\r
47 var me = this,\r
48 layout = me.getLayout();\r
49\r
50 if (me.isAnimating) {\r
51 me.stopAnimation();\r
52 }\r
53\r
54 if (layout) {\r
55 layout.un('beforeactiveitemchange', 'onActiveItemChange', this);\r
56 }\r
57 me.setLayout(null);\r
58\r
59 if (me.observableId) {\r
60 me.fireEvent('destroy', this);\r
61 }\r
62 me.callParent();\r
63 }\r
64});\r