Commit ecac355e11e008e3cf9b4445eba0d8e2ab5c8c02
1 parent
72884bb3
Exists in
master
and in
110 other branches
Destroy plot elements when they are unregistered
Showing
3 changed files
with
11 additions
and
9 deletions
Show diff stats
js/app/views/PlotComponents/PlotElementPanel.js
... | ... | @@ -23,7 +23,8 @@ Ext.define('amdaPlotComp.PlotElementPanel', { |
23 | 23 | destroy: function() { |
24 | 24 | this.elementFormsManager.each(function (key, value, length) { |
25 | 25 | this.elementFormsManager.unregister(value); |
26 | - }, this); | |
26 | + value.destroy(); | |
27 | + }, this); | |
27 | 28 | this.callParent(); |
28 | 29 | }, |
29 | 30 | |
... | ... | @@ -188,4 +189,4 @@ Ext.define('amdaPlotComp.PlotElementPanel', { |
188 | 189 | |
189 | 190 | Ext.apply (this , Ext.apply (arguments, myConf)); |
190 | 191 | } |
191 | -}); | |
192 | 192 | \ No newline at end of file |
193 | +}); | ... | ... |
js/app/views/PlotComponents/PlotLayoutForm.js
... | ... | @@ -23,8 +23,9 @@ Ext.define('amdaPlotComp.PlotLayoutForm', { |
23 | 23 | |
24 | 24 | destroy: function() { |
25 | 25 | this.layoutOptionsFormsManager.each(function (key, value, length) { |
26 | - this.layoutOptionsFormsManager.unregister(value); | |
27 | - }, this); | |
26 | + this.layoutOptionsFormsManager.unregister(value); | |
27 | + value.destroy(); | |
28 | + }, this); | |
28 | 29 | this.callParent(); |
29 | 30 | }, |
30 | 31 | |
... | ... | @@ -99,4 +100,4 @@ Ext.define('amdaPlotComp.PlotLayoutForm', { |
99 | 100 | this.layoutOptionsContainer |
100 | 101 | ]; |
101 | 102 | } |
102 | -}); | |
103 | 103 | \ No newline at end of file |
104 | +}); | ... | ... |
js/app/views/PlotComponents/PlotParamForm.js
... | ... | @@ -30,8 +30,9 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
30 | 30 | |
31 | 31 | destroy: function() { |
32 | 32 | this.drawingOptionsFormsManager.each(function (key, value, length) { |
33 | - this.drawingOptionsFormsManager.unregister(value); | |
34 | - }, this); | |
33 | + this.drawingOptionsFormsManager.unregister(value); | |
34 | + value.destroy(); | |
35 | + }, this); | |
35 | 36 | this.callParent(); |
36 | 37 | }, |
37 | 38 | |
... | ... | @@ -49,7 +50,6 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
49 | 50 | formId = type; |
50 | 51 | |
51 | 52 | formId += '-drawing-options-form'; |
52 | - | |
53 | 53 | if (!this.drawingOptionsFormsManager.get(formId)) |
54 | 54 | { |
55 | 55 | switch(type) |
... | ... | @@ -143,4 +143,4 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
143 | 143 | this.drawingOptionsContainer |
144 | 144 | ]; |
145 | 145 | } |
146 | -}); | |
147 | 146 | \ No newline at end of file |
147 | +}); | ... | ... |