Commit 828dd660125ee9ee37b7c4e00a03dba401f30096
1 parent
7ad0629e
Exists in
master
and in
106 other branches
Give the possibility to define resolution for a spectro (#6832)
Showing
3 changed files
with
8 additions
and
1 deletions
Show diff stats
js/app/models/PlotObjects/PlotObjectConfig.js
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(); | ... | ... |