Commit 981b15965afae55fcfd3e13b7b16f34d581baddd
1 parent
6b6517df
Exists in
master
and in
111 other branches
Remove related additionnal curves after a serie deletion in the plot module
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
js/app/models/PlotObjects/PlotPanelObject.js
... | ... | @@ -371,6 +371,13 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
371 | 371 | return false; |
372 | 372 | this.params().remove(paramRecord); |
373 | 373 | this.dirty = true; |
374 | + var curvesToRemove = []; | |
375 | + this.curves().each(function(curve) { | |
376 | + if (curve.get('curve-serie-id') == paramId) { | |
377 | + curvesToRemove.push(curve); | |
378 | + } | |
379 | + }); | |
380 | + this.curves().remove(curvesToRemove); | |
374 | 381 | return true; |
375 | 382 | }, |
376 | 383 | |
... | ... | @@ -753,4 +760,4 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
753 | 760 | |
754 | 761 | return panelValues; |
755 | 762 | } |
756 | -}); | |
757 | 763 | \ No newline at end of file |
764 | +}); | ... | ... |