Commit 1c1417db7c117415799d7f16d0e1c490cf3969ab
1 parent
9b67ae6b
Exists in
master
and in
22 other branches
Fix bug after merge
Showing
2 changed files
with
10 additions
and
5 deletions
Show diff stats
js/app/views/ColorMap.js
... | ... | @@ -4,7 +4,7 @@ Ext.define('amdaUI.ColorMap', { |
4 | 4 | |
5 | 5 | |
6 | 6 | data : [], |
7 | - onChange: null, | |
7 | + onValueChange: null, | |
8 | 8 | |
9 | 9 | constructor:function(config){ |
10 | 10 | this.getData(); |
... | ... | @@ -37,6 +37,7 @@ Ext.define('amdaUI.ColorMap', { |
37 | 37 | </div></tpl>', |
38 | 38 | editable: false, |
39 | 39 | queryMode: 'local', |
40 | + onValueChange: config.onValueChange, | |
40 | 41 | listeners: { |
41 | 42 | change: function (combo, newValue, oldValue, eOpts) { |
42 | 43 | var iconUrl=""; |
... | ... | @@ -55,8 +56,8 @@ Ext.define('amdaUI.ColorMap', { |
55 | 56 | |
56 | 57 | combo.inputEl.set({ "data-qtip": Ext.String.htmlDecode(colorName) }); |
57 | 58 | |
58 | - if (me.onChange) | |
59 | - me.onChange(me.name, newValue, oldValue); | |
59 | + if (me.onValueChange) | |
60 | + me.onValueChange(me.name, newValue, oldValue); | |
60 | 61 | }, |
61 | 62 | click: { |
62 | 63 | element: 'el', | ... | ... |
js/app/views/PlotComponents/PlotStandardForm.js
... | ... | @@ -436,11 +436,15 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
436 | 436 | }, |
437 | 437 | |
438 | 438 | addColorMapCombo: function (name, onChange) { |
439 | + var me = this; | |
439 | 440 | return { |
440 | 441 | xtype: 'colormap', |
441 | 442 | name: name, |
442 | - onChange: function(name, newValue, oldValue) { | |
443 | - this.object.set(name, newValue); | |
443 | + size: 26, | |
444 | + onValueChange: function(name, newValue, oldValue) { | |
445 | + me.object.set(name, newValue); | |
446 | + if (onChange != null) | |
447 | + onChange(name, newValue, oldValue); | |
444 | 448 | } |
445 | 449 | }; |
446 | 450 | }, | ... | ... |