PlotSauvaudForm.js
1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* 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'
],
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)];
},
getFormItems: function () {
items = this.callParent();
const ref = this;
const dataStore = [
{ 'key': 0, 'value': 'dim1' },
{ 'key': 1, 'value': 'dim2' },
];
const dimField = this.addStandardCombo('right_dimension', 'Switch Dimension', dataStore , function (name, value, oldValue) {
if (ref.object.get('right_dim') != value) {
ref.object.set('right_dim', value);
}
});
items.splice(0,0, dimField);
return items;
},
});