From 9b729ba57dc1a5cac261e4fb373f4b133dcecdba Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND <hacene.si-hadj-mohand@akka.eu> Date: Thu, 27 Jan 2022 09:40:46 +0100 Subject: [PATCH] adding warning messages on sauvaud plot --- js/app/views/PlotComponents/PlotParamForm.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/app/views/PlotComponents/PlotParamForm.js b/js/app/views/PlotComponents/PlotParamForm.js index 4231033..38f6014 100644 --- a/js/app/views/PlotComponents/PlotParamForm.js +++ b/js/app/views/PlotComponents/PlotParamForm.js @@ -64,6 +64,11 @@ Ext.define('amdaPlotComp.PlotParamForm', { this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotOrbitSerieForm({ id: formId })); break; case 'sauvaud': + if(this.object.get('type') !=2){ + myDesktopApp.warningMsg('Sauvaud Plot requires <b>2D Parameter</b> '); + }else if(this.object.get('dim1-index') != '*' || this.object.get('dim2-index') != '*' ){ + myDesktopApp.warningMsg('Sauvaud Plot requires the selection of <b>All Arguments</b> in both directions'); + } this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotSauvaudForm({ id: formId })); break; case 'spectro': @@ -117,7 +122,8 @@ Ext.define('amdaPlotComp.PlotParamForm', { onChangeParamArgs: function (uiScope, args_key, newValue, oldValue, isTemplateArg) { if ((uiScope.isFirstMsg) && (uiScope.object.get('type') == 2) && (uiScope.object.get('dim1-sum-type') == 0) && (uiScope.object.get('dim2-sum-type') == 0) && - (uiScope.object.get('dim1-index') == '*') && (uiScope.object.get('dim2-index') == '*')) { + (uiScope.object.get('dim1-index') == '*') && (uiScope.object.get('dim2-index') == '*') && (uiScope.object.get('param-drawing-type') != 'sauvaud')) { + console.log(uiScope.object); uiScope.isFirstMsg = false; myDesktopApp.warningMsg('If argument <i>All</i> is set for both dimensions output will be the total sum <b>(not spectra!)</b>'); } -- libgit2 0.21.2