diff --git a/js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js b/js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js index d8cdd9e..854fbd5 100644 --- a/js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js +++ b/js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js @@ -2,7 +2,7 @@ Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', { extend: 'amdaPlotComp.intervalSelection.IntervalSelection', // This class extends from amdaPlotComp.intervalSelection.IntervalSelection requires: ['amdaPlotComp.plotFunction.FunctionType'], // This class requires the FunctionType class from amdaPlotComp.plotFunction - title: "Plot Function", // The title of this interval selection + title: "Plot Function", // The title of the window plotFunctionType: null, // An instance of the FunctionType class, initially set to null /** diff --git a/js/app/views/PlotComponents/plotFunction/FFTCmpt.js b/js/app/views/PlotComponents/plotFunction/FFTCmpt.js index 125dd52..51deb6d 100644 --- a/js/app/views/PlotComponents/plotFunction/FFTCmpt.js +++ b/js/app/views/PlotComponents/plotFunction/FFTCmpt.js @@ -1,8 +1,12 @@ Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { - extend: 'amdaPlotComp.plotFunction.BaseComponent', - title: "FFT Arguments", - id: 'fftComboBox', - + extend: 'amdaPlotComp.plotFunction.BaseComponent', // This class extends from amdaPlotComp.plotFunction.BaseComponent + title: "FFT Arguments", // The title of this component + id: 'fftComboBox', // The id of this component + + /** + * Initializes the component. + * It creates a combo box with two options, 'Frequency' and 'Period', and adds it to the component. + */ initComponent: function () { const me = this; @@ -34,8 +38,12 @@ Ext.define('amdaPlotComp.plotFunction.FFTCmpt', { me.callParent(arguments); }, + /** + * Retrieves the selected value from the combo box. + * Returns an object with a property 'abscisse' set to the selected value. + */ getValues: function () { - const fftComboBox = this.down('#'+this.id); // Retrieve ComboBox by itemId + const fftComboBox = this.down('#' + this.id); // Retrieve ComboBox by itemId const selectedValue = fftComboBox.getValue(); // Get selected value return { -- libgit2 0.21.2