Blame view

js/app/views/PlotComponents/PlotSauvaudForm.js 1.8 KB
5b3c2c8a   Hacene SI HADJ MOHAND   ihm for sauvaud plot
1
2
3
4
5
6
7
8
9
10
11
12
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


Ext.define('amdaPlotComp.PlotSauvaudForm', {
	extend: 'amdaPlotComp.PlotSpectroForm', 
        	requires: [
		'amdaUI.ParamArgumentsUI'
	],
bc4ec521   Hacene SI HADJ MOHAND   il reste quelques...
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
        setObject: function (object) {
		this.data = object.data;
		this.object = object.get('param-drawing-object');

		this.loadRecord(this.object);
	},
        
        	/**
	 * Populate the comboBoxValue by the set of channel data related to the selected dimension
	 * @param {*} ref  the reference of the current instance of this class
	 * @param {*} index dimension's index
	 * @param {*} comboBoxV  the comboBoxValue
	 * @returns 
	 */

        
  	addComboSauvaudDim: (ref) => {

		const comboBoxDim = ref.addStandardCombo(amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimkey,
			amdaPlotObj.PlotObjectConfig.bgSubstraction.value.dimlabel, [],
			(name, newKey, oldKey) => {

					ref.populateSauvaudComboBoxValue(ref, newKey, this);
			});

		return comboBoxDim;
	},

           getSauvaudItems(){
                return [this.addComboSauvaudDim(this)];
            },
5b3c2c8a   Hacene SI HADJ MOHAND   ihm for sauvaud plot
44
45
46
47
        
        getFormItems: function () {
             items = this.callParent();
            const ref = this;
bc4ec521   Hacene SI HADJ MOHAND   il reste quelques...
48
49
50
51
52
           const dataStore = [
                                              { 'key': 0, 'value': 'dim1' },
		      { 'key': 1, 'value': 'dim2' }, 
                                            ];
            const dimField = this.addStandardCombo('right_dimension', 'Right Dim', dataStore , function (name, value, oldValue) {
5b3c2c8a   Hacene SI HADJ MOHAND   ihm for sauvaud plot
53
54
55
56
57
58
59
60
61
				if (ref.object.get('right_dim') != value) {
					ref.object.set('right_dim', value);
				}
			});
        
           items.splice(0,0, dimField);
            return items;
        },
    });