Blame view

js/app/views/PlotComponents/intervalSelection/ZoomIntervalSelection.js 1.4 KB
1591d4c2   Menouard AZIB   Basic functionali...
1
2
3
4
5
6
7
Ext.define('amdaPlotComp.intervalSelection.ZoomIntervalSelection', {
    extend: 'amdaPlotComp.intervalSelection.IntervalSelection', // This class extends from amdaPlotComp.intervalSelection.IntervalSelection

    buttonApply: "Apply Zoom",
    type: null,

    initComponent: function () {
9ea5aa6b   Menouard AZIB   Add comments to I...
8
        const self = this;
1591d4c2   Menouard AZIB   Basic functionali...
9
        this.callParent(arguments);
9ea5aa6b   Menouard AZIB   Add comments to I...
10
        this.form.getDockedItems('toolbar[dock="bottom"]')[0].add({
1591d4c2   Menouard AZIB   Basic functionali...
11
            xtype: 'button',
aba2eb97   Menouard AZIB   Add InsertToTTCat...
12
            width: width,
1591d4c2   Menouard AZIB   Basic functionali...
13
14
            text: 'Undo Zoom',
            handler: function () {
9ea5aa6b   Menouard AZIB   Add comments to I...
15
                self._undoZoom();
1591d4c2   Menouard AZIB   Basic functionali...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
            }
        });
    },

    _apply: function () {
        if (this._notValidValues()) {
            myDesktopApp.warningMsg('The Input Values are not defined');
        } else {
            this.hostCmp.callInteractivePlot({
                'action': 'zoom',
                'interactiveId': this.interactiveId,
                'panelId': this.panelId,
                'axeId': this.type,
                'min': this.getField1Value(),
                'max': this.getField2Value()
            });
2dc9b65a   Menouard AZIB   All refactored cm...
32
33

            this._resetHostCmpSelection();
1591d4c2   Menouard AZIB   Basic functionali...
34
35
36
37
38
39
40
41
42
43
        }
    },

    _undoZoom: function () {
        this.hostCmp.callInteractivePlot({
            'action': 'undozoom',
            'interactiveId': this.interactiveId,
            'panelId': this.panelId,
            'axeId': this.type
        });
2dc9b65a   Menouard AZIB   All refactored cm...
44
45

        this._resetHostCmpSelection();
1591d4c2   Menouard AZIB   Basic functionali...
46
47
48
    }

});