Commit 828dd660125ee9ee37b7c4e00a03dba401f30096

Authored by Benjamin Renard
1 parent 7ad0629e

Give the possibility to define resolution for a spectro (#6832)

js/app/models/PlotObjects/PlotObjectConfig.js
... ... @@ -140,7 +140,8 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
140 140 projection : 'XY'
141 141 },
142 142 spectro : {
143   - yAxis : 'y-left'
  143 + yAxis : 'y-left',
  144 + resolution : 3000
144 145 },
145 146 legends : {
146 147 series : {
... ...
js/app/models/PlotObjects/PlotSpectroObject.js
... ... @@ -22,6 +22,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', {
22 22  
23 23 fields : [
24 24 {name: 'spectro-yaxis', type: 'string'},
  25 + {name: 'spectro-resolution', type: 'int'},
25 26 {name: 'spectro-value-min', type: 'float', useNull:true},
26 27 {name: 'spectro-value-max', type: 'float', useNull:true},
27 28 {name: 'spectro-log0-as-min', type: 'boolean'}
... ... @@ -53,6 +54,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', {
53 54 setDefaultValues: function()
54 55 {
55 56 this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis);
  57 + this.set('spectro-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.resolution);
56 58 this.set('spectro-log0-as-min', false);
57 59 },
58 60  
... ... @@ -61,6 +63,7 @@ Ext.define('amdaPlotObj.PlotSpectroObject', {
61 63 var spectroValues = new Object();
62 64  
63 65 spectroValues['spectro-yaxis'] = this.get('spectro-yaxis');
  66 + spectroValues['spectro-resolution'] = this.get('spectro-resolution');
64 67 spectroValues['spectro-value-min'] = this.get('spectro-value-min');
65 68 spectroValues['spectro-value-max'] = this.get('spectro-value-max');
66 69 spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min');
... ...
js/app/views/PlotComponents/PlotSpectroForm.js
... ... @@ -26,6 +26,9 @@ Ext.define('amdaPlotComp.PlotSpectroForm', {
26 26 getFormItems: function() {
27 27 var me = this;
28 28 return [
  29 + this.addStandardCombo('spectro-resolution', 'Points per plot', amdaPlotObj.PlotObjectConfig.availableResolutions, function(name, value, oldValue) {
  30 + me.object.set('spectro-resolution', value);
  31 + }),
29 32 this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
30 33 me.object.set('spectro-yaxis', value);
31 34 me.crtTree.refresh();
... ...