Commit e9597b38cab466cc5560a23789e014a0e1c676cd
1 parent
779f2914
Exists in
master
and in
16 other branches
Add comments to PlotFunctionIntervalSelection.js
Showing
1 changed file
with
13 additions
and
4 deletions
Show diff stats
js/app/views/PlotComponents/intervalSelection/PlotFunctionIntervalSelection.js
1 | 1 | Ext.define('amdaPlotComp.intervalSelection.PlotFunctionIntervalSelection', { |
2 | - extend: 'amdaPlotComp.intervalSelection.IntervalSelection', | |
3 | - requires: ['amdaPlotComp.plotFunction.FunctionType'], | |
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 | |
4 | 4 | |
5 | - title: "Plot Function", | |
6 | - plotFunctionType: null, | |
5 | + title: "Plot Function", // The title of this interval selection | |
6 | + plotFunctionType: null, // An instance of the FunctionType class, initially set to null | |
7 | 7 | |
8 | + /** | |
9 | + * Initializes the component. | |
10 | + * It calls the parent's initComponent method, then creates a new instance of FunctionType and adds it to the form. | |
11 | + */ | |
8 | 12 | initComponent: function () { |
9 | 13 | this.callParent(arguments); |
10 | 14 | this.plotFunctionType = new amdaPlotComp.plotFunction.FunctionType(); |
11 | 15 | this.form.add(this.plotFunctionType); |
12 | 16 | }, |
13 | 17 | |
18 | + /** | |
19 | + * Applies the plot function based on the values of the fields. | |
20 | + * If the values are not valid, it shows a warning message. | |
21 | + * Otherwise, it calls the interactive plot with the plotFunction action and resets the host component selection. | |
22 | + */ | |
14 | 23 | _apply: function () { |
15 | 24 | if (this._notValidValues()) { |
16 | 25 | myDesktopApp.warningMsg('Please note that either the Start Time or the Stop Time has not been defined. To proceed, ensure both times are properly set.'); | ... | ... |