From 1c1417db7c117415799d7f16d0e1c490cf3969ab Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 18 Apr 2023 14:16:39 +0000 Subject: [PATCH] Fix bug after merge --- js/app/views/ColorMap.js | 7 ++++--- js/app/views/PlotComponents/PlotStandardForm.js | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/js/app/views/ColorMap.js b/js/app/views/ColorMap.js index be9c94a..41248fc 100644 --- a/js/app/views/ColorMap.js +++ b/js/app/views/ColorMap.js @@ -4,7 +4,7 @@ Ext.define('amdaUI.ColorMap', { data : [], - onChange: null, + onValueChange: null, constructor:function(config){ this.getData(); @@ -37,6 +37,7 @@ Ext.define('amdaUI.ColorMap', { ', editable: false, queryMode: 'local', + onValueChange: config.onValueChange, listeners: { change: function (combo, newValue, oldValue, eOpts) { var iconUrl=""; @@ -55,8 +56,8 @@ Ext.define('amdaUI.ColorMap', { combo.inputEl.set({ "data-qtip": Ext.String.htmlDecode(colorName) }); - if (me.onChange) - me.onChange(me.name, newValue, oldValue); + if (me.onValueChange) + me.onValueChange(me.name, newValue, oldValue); }, click: { element: 'el', diff --git a/js/app/views/PlotComponents/PlotStandardForm.js b/js/app/views/PlotComponents/PlotStandardForm.js index c50828e..19f3e49 100644 --- a/js/app/views/PlotComponents/PlotStandardForm.js +++ b/js/app/views/PlotComponents/PlotStandardForm.js @@ -436,11 +436,15 @@ Ext.define('amdaPlotComp.PlotStandardForm', { }, addColorMapCombo: function (name, onChange) { + var me = this; return { xtype: 'colormap', name: name, - onChange: function(name, newValue, oldValue) { - this.object.set(name, newValue); + size: 26, + onValueChange: function(name, newValue, oldValue) { + me.object.set(name, newValue); + if (onChange != null) + onChange(name, newValue, oldValue); } }; }, -- libgit2 0.21.2