]>
Commit | Line | Data |
---|---|---|
947f0963 TL |
1 | /** |
2 | * Demonstrates usage of an absolute layout. | |
3 | */ | |
4 | Ext.define('KitchenSink.view.layout.Absolute', { | |
5 | extend: 'Ext.panel.Panel', | |
6 | requires: [ | |
7 | 'Ext.layout.container.Absolute' | |
8 | ], | |
9 | xtype: 'layout-absolute', | |
10 | //<example> | |
11 | exampleTitle: 'Absolute Layout', | |
12 | //</example> | |
13 | profiles: { | |
14 | classic: { | |
15 | panelWidth: 200, | |
16 | panelHeight: 100, | |
17 | panel1xAxis: 50, | |
18 | panel1yAxis: 50, | |
19 | panel2xAxis: 125, | |
20 | panel2yAxis: 125 | |
21 | }, | |
22 | neptune: { | |
23 | panelWidth: 200, | |
24 | panelHeight: 100, | |
25 | panel1xAxis: 50, | |
26 | panel1yAxis: 50, | |
27 | panel2xAxis: 125, | |
28 | panel2yAxis: 125 | |
29 | }, | |
30 | graphite: { | |
31 | panelWidth: 300, | |
32 | panelHeight: 150, | |
33 | panel1xAxis: 55, | |
34 | panel1yAxis: 55, | |
35 | panel2xAxis: 155, | |
36 | panel2yAxis: 155 | |
37 | }, | |
38 | 'classic-material': { | |
39 | panelWidth: 300, | |
40 | panelHeight: 150, | |
41 | panel1xAxis: 55, | |
42 | panel1yAxis: 55, | |
43 | panel2xAxis: 155, | |
44 | panel2yAxis: 155 | |
45 | } | |
46 | }, | |
47 | layout: 'absolute', | |
48 | width: 500, | |
49 | height: 400, | |
50 | cls: Ext.baseCSSPrefix + 'shadow', | |
51 | ||
52 | defaults: { | |
53 | bodyPadding: 15, | |
54 | width: '${panelWidth}', | |
55 | height: '${panelHeight}', | |
56 | frame: true | |
57 | }, | |
58 | ||
59 | items: [ | |
60 | { | |
61 | title: 'Panel 1', | |
62 | x: '${panel1xAxis}', | |
63 | y: '${panel1yAxis}', | |
64 | html: 'Positioned at x:${panel1xAxis}, y:${panel1yAxis}' | |
65 | }, | |
66 | { | |
67 | title: 'Panel 2', | |
68 | x: '${panel2xAxis}', | |
69 | y: '${panel2yAxis}', | |
70 | html: 'Positioned at x:${panel2xAxis}, y:${panel2yAxis}' | |
71 | } | |
72 | ] | |
73 | ||
74 | }); |