From b350c87a7ba4341c7d7b97eac1236779a8f70bd1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 26 Apr 2023 09:23:51 +0000 Subject: [PATCH] Fix color map selection in DefaultValuesWindow --- js/app/views/ColorMap.js | 10 +++++++--- js/app/views/PlotComponents/PlotStandardForm.js | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/js/app/views/ColorMap.js b/js/app/views/ColorMap.js index 41248fc..7233eda 100644 --- a/js/app/views/ColorMap.js +++ b/js/app/views/ColorMap.js @@ -21,11 +21,15 @@ Ext.define('amdaUI.ColorMap', { init: function(config){ var me = this; var size = (typeof config !== "undefined" && config.size) ? config.size : '12'; + var hideFieldLabel = true; + if (typeof config !== "undefined") { + hideFieldLabel = (config.hideFieldLabel !== false); + } Ext.apply(this,{ xtype:'combobox', name: (typeof config !== "undefined" && config.name) ? config.name:null, - fieldLabel: 'Color Map ', editable: false, queryMode: 'local', - onValueChange: config.onValueChange, + onValueChange: (typeof config !== "undefined" && config.onValueChange) ? config.onValueChange : null, listeners: { change: function (combo, newValue, oldValue, eOpts) { var iconUrl=""; diff --git a/js/app/views/PlotComponents/PlotStandardForm.js b/js/app/views/PlotComponents/PlotStandardForm.js index 19f3e49..3b7962e 100644 --- a/js/app/views/PlotComponents/PlotStandardForm.js +++ b/js/app/views/PlotComponents/PlotStandardForm.js @@ -441,6 +441,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { xtype: 'colormap', name: name, size: 26, + hideFieldLabel: false, onValueChange: function(name, newValue, oldValue) { me.object.set(name, newValue); if (onChange != null) -- libgit2 0.21.2