Commit 7b6efa6c62433c97c6f541c1d7146c647e178aa4

Authored by Menouard AZIB
1 parent 9ea5aa6b

Add comments to ZoomIntervalSelection.js

js/app/views/PlotComponents/intervalSelection/ZoomIntervalSelection.js
... ... @@ -4,6 +4,10 @@ Ext.define('amdaPlotComp.intervalSelection.ZoomIntervalSelection', {
4 4 buttonApply: "Apply Zoom",
5 5 type: null,
6 6  
  7 + /**
  8 + * Initializes the component.
  9 + * Adds an 'Undo Zoom' button to the bottom toolbar of the form.
  10 + */
7 11 initComponent: function () {
8 12 const self = this;
9 13 this.callParent(arguments);
... ... @@ -17,6 +21,11 @@ Ext.define('amdaPlotComp.intervalSelection.ZoomIntervalSelection', {
17 21 });
18 22 },
19 23  
  24 + /**
  25 + * Applies the zoom based on the values of the fields.
  26 + * If the values are not valid, it shows a warning message.
  27 + * Otherwise, it calls the interactive plot with the zoom action and resets the host component selection.
  28 + */
20 29 _apply: function () {
21 30 if (this._notValidValues()) {
22 31 myDesktopApp.warningMsg('The Input Values are not defined');
... ... @@ -34,6 +43,10 @@ Ext.define('amdaPlotComp.intervalSelection.ZoomIntervalSelection', {
34 43 }
35 44 },
36 45  
  46 + /**
  47 + * Undoes the zoom.
  48 + * It calls the interactive plot with the undozoom action and resets the host component selection.
  49 + */
37 50 _undoZoom: function () {
38 51 this.hostCmp.callInteractivePlot({
39 52 'action': 'undozoom',
... ...