]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * @class Ext.chart.overrides.AbstractChart\r | |
3 | */\r | |
4 | Ext.define('Ext.chart.overrides.AbstractChart', {\r | |
5 | override: 'Ext.chart.AbstractChart',\r | |
6 | \r | |
7 | updateLegend: function (legend, oldLegend) {\r | |
8 | var dock;\r | |
9 | this.callParent([legend, oldLegend]);\r | |
10 | if (legend) {\r | |
11 | dock = legend.docked;\r | |
12 | this.addDocked({\r | |
13 | dock: dock,\r | |
14 | xtype: 'panel',\r | |
15 | shrinkWrap: true,\r | |
16 | scrollable: true,\r | |
17 | layout: {\r | |
18 | type: dock === 'top' || dock === 'bottom' ? 'hbox' : 'vbox',\r | |
19 | pack: 'center'\r | |
20 | },\r | |
21 | items: legend,\r | |
22 | cls: Ext.baseCSSPrefix + 'legend-panel'\r | |
23 | });\r | |
24 | }\r | |
25 | },\r | |
26 | \r | |
27 | performLayout: function() {\r | |
28 | if (this.isVisible(true)) {\r | |
29 | return this.callParent();\r | |
30 | }\r | |
31 | this.cancelChartLayout();\r | |
32 | return false;\r | |
33 | },\r | |
34 | \r | |
35 | afterComponentLayout: function(width, height, oldWidth, oldHeight) {\r | |
36 | this.callParent([width, height, oldWidth, oldHeight]);\r | |
37 | this.scheduleLayout();\r | |
38 | },\r | |
39 | \r | |
40 | allowSchedule: function() {\r | |
41 | return this.rendered;\r | |
42 | },\r | |
43 | \r | |
44 | onDestroy: function () {\r | |
45 | this.destroyChart();\r | |
46 | this.callParent(arguments);\r | |
47 | }\r | |
48 | \r | |
49 | }); |