diff --git a/js/app/models/PlotObjects/PlotObjectConfig.js b/js/app/models/PlotObjects/PlotObjectConfig.js index bb780d4..412f1f1 100644 --- a/js/app/models/PlotObjects/PlotObjectConfig.js +++ b/js/app/models/PlotObjects/PlotObjectConfig.js @@ -473,6 +473,11 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { {'key' : 'serie-constant', 'value' : 'Serie / Constant'}, {'key' : 'serie-serie', 'value' : 'Serie / Serie'} ], + availableSpectroNormalization : [ + {'key' : 'none', 'value' : 'None'}, + {'key' : 'linear', 'value' : 'linear'}, + {'key' : 'logarithmic', 'value' : 'log'} + ], getParamConfig : function(paramId, onParamConfigLoaded) { AmdaAction.getParamPlotInit({"paramId" : paramId}, function (result, e) { diff --git a/js/app/models/PlotObjects/PlotSpectroObject.js b/js/app/models/PlotObjects/PlotSpectroObject.js index 6676610..fa53a7d 100644 --- a/js/app/models/PlotObjects/PlotSpectroObject.js +++ b/js/app/models/PlotObjects/PlotSpectroObject.js @@ -22,10 +22,11 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { fields : [ {name: 'spectro-yaxis', type: 'string'}, - {name: 'spectro-resolution', type: 'int'}, + {name: 'spectro-resolution', type: 'int'}, {name: 'spectro-value-min', type: 'float', useNull:true}, {name: 'spectro-value-max', type: 'float', useNull:true}, - {name: 'spectro-log0-as-min', type: 'boolean'} + {name: 'spectro-log0-as-min', type: 'boolean'}, + {name: 'spectro-normalization', type: 'string'} ], constructor: function(){ @@ -55,7 +56,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { { this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis); this.set('spectro-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.resolution); - this.set('spectro-log0-as-min', false); + this.set('spectro-log0-as-min', false); + this.set('spectro-normalization', "none"); }, getJsonValues : function() @@ -66,8 +68,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { spectroValues['spectro-resolution'] = this.get('spectro-resolution'); spectroValues['spectro-value-min'] = this.get('spectro-value-min'); spectroValues['spectro-value-max'] = this.get('spectro-value-max'); - spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); - + spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); + spectroValues['spectro-normalization'] = this.get('spectro-normalization'); return spectroValues; } }); diff --git a/js/app/views/PlotComponents/PlotSpectroForm.js b/js/app/views/PlotComponents/PlotSpectroForm.js index d36bafa..44ee33b 100644 --- a/js/app/views/PlotComponents/PlotSpectroForm.js +++ b/js/app/views/PlotComponents/PlotSpectroForm.js @@ -37,7 +37,13 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()), this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) { me.object.set('spectro-log0-as-min', value); - }) + }), + this.addStandardCombo('spectro-normalization', 'Normalization', amdaPlotObj.PlotObjectConfig.availableSpectroNormalization, function(name, value, oldValue) { + if (me.object.get('spectro-normalization') != value) + { + me.object.set('spectro-normalization', value); + } + }) ]; } }); -- libgit2 0.21.2