]> git.proxmox.com Git - extjs.git/blame - extjs/packages/core/src/fx/layout/Card.js
add extjs 6.0.1 sources
[extjs.git] / extjs / packages / core / src / fx / layout / Card.js
CommitLineData
6527f429
DM
1/**\r
2 * @private\r
3 */\r
4Ext.define('Ext.fx.layout.Card', {\r
5 requires: [\r
6 'Ext.fx.layout.card.Slide',\r
7 'Ext.fx.layout.card.Cover',\r
8 'Ext.fx.layout.card.Reveal',\r
9 'Ext.fx.layout.card.Fade',\r
10 'Ext.fx.layout.card.Flip',\r
11 'Ext.fx.layout.card.Pop',\r
12// 'Ext.fx.layout.card.Cube',\r
13 'Ext.fx.layout.card.Scroll'\r
14 ],\r
15\r
16 constructor: function(config) {\r
17 var defaultClass = Ext.fx.layout.card.Abstract,\r
18 type;\r
19\r
20 if (!config) {\r
21 return null;\r
22 }\r
23\r
24 if (typeof config == 'string') {\r
25 type = config;\r
26\r
27 config = {};\r
28 }\r
29 else if (config.type) {\r
30 type = config.type;\r
31 }\r
32\r
33 config.elementBox = false;\r
34\r
35 if (type) {\r
36\r
37 defaultClass = Ext.ClassManager.getByAlias('fx.layout.card.' + type);\r
38\r
39 //<debug>\r
40 if (!defaultClass) {\r
41 Ext.Logger.error("Unknown card animation type: '" + type + "'");\r
42 }\r
43 //</debug>\r
44 }\r
45\r
46 return Ext.factory(config, defaultClass);\r
47 }\r
48});\r