Commit 9150eb423397d0458e52a5a3097ffecc99198348

Authored by Menouard AZIB
1 parent 11c71fa5

Add comments to FFTCmpt.js

js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js
... ... @@ -2,7 +2,7 @@ Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', {
2 2 extend: 'amdaPlotComp.intervalSelection.IntervalSelection', // This class extends from amdaPlotComp.intervalSelection.IntervalSelection
3 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 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 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 10 initComponent: function () {
7 11 const me = this;
8 12  
... ... @@ -34,8 +38,12 @@ Ext.define('amdaPlotComp.plotFunction.FFTCmpt', {
34 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 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 47 const selectedValue = fftComboBox.getValue(); // Get selected value
40 48  
41 49 return {
... ...