Commit 9150eb423397d0458e52a5a3097ffecc99198348
1 parent
11c71fa5
Exists in
master
and in
16 other branches
Add comments to FFTCmpt.js
Showing
2 changed files
with
14 additions
and
6 deletions
Show diff stats
js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js
@@ -2,7 +2,7 @@ Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', { | @@ -2,7 +2,7 @@ Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', { | ||
2 | extend: 'amdaPlotComp.intervalSelection.IntervalSelection', // This class extends from amdaPlotComp.intervalSelection.IntervalSelection | 2 | extend: 'amdaPlotComp.intervalSelection.IntervalSelection', // This class extends from amdaPlotComp.intervalSelection.IntervalSelection |
3 | requires: ['amdaPlotComp.plotFunction.FunctionType'], // This class requires the FunctionType class from amdaPlotComp.plotFunction | 3 | requires: ['amdaPlotComp.plotFunction.FunctionType'], // This class requires the FunctionType class from amdaPlotComp.plotFunction |
4 | 4 | ||
5 | - title: "Plot Function", // The title of this interval selection | 5 | + title: "Plot Function", // The title of the window |
6 | plotFunctionType: null, // An instance of the FunctionType class, initially set to null | 6 | plotFunctionType: null, // An instance of the FunctionType class, initially set to null |
7 | 7 | ||
8 | /** | 8 | /** |
js/app/views/PlotComponents/plotFunction/FFTCmpt.js
1 | Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { | 1 | Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { |
2 | - extend: 'amdaPlotComp.plotFunction.BaseComponent', | ||
3 | - title: "FFT Arguments", | ||
4 | - id: 'fftComboBox', | ||
5 | - | 2 | + extend: 'amdaPlotComp.plotFunction.BaseComponent', // This class extends from amdaPlotComp.plotFunction.BaseComponent |
3 | + title: "FFT Arguments", // The title of this component | ||
4 | + id: 'fftComboBox', // The id of this component | ||
5 | + | ||
6 | + /** | ||
7 | + * Initializes the component. | ||
8 | + * It creates a combo box with two options, 'Frequency' and 'Period', and adds it to the component. | ||
9 | + */ | ||
6 | initComponent: function () { | 10 | initComponent: function () { |
7 | const me = this; | 11 | const me = this; |
8 | 12 | ||
@@ -34,8 +38,12 @@ Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { | @@ -34,8 +38,12 @@ Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { | ||
34 | me.callParent(arguments); | 38 | me.callParent(arguments); |
35 | }, | 39 | }, |
36 | 40 | ||
41 | + /** | ||
42 | + * Retrieves the selected value from the combo box. | ||
43 | + * Returns an object with a property 'abscisse' set to the selected value. | ||
44 | + */ | ||
37 | getValues: function () { | 45 | getValues: function () { |
38 | - const fftComboBox = this.down('#'+this.id); // Retrieve ComboBox by itemId | 46 | + const fftComboBox = this.down('#' + this.id); // Retrieve ComboBox by itemId |
39 | const selectedValue = fftComboBox.getValue(); // Get selected value | 47 | const selectedValue = fftComboBox.getValue(); // Get selected value |
40 | 48 | ||
41 | return { | 49 | return { |