Commit b350c87a7ba4341c7d7b97eac1236779a8f70bd1
1 parent
17ac91c7
Exists in
master
and in
21 other branches
Fix color map selection in DefaultValuesWindow
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
js/app/views/ColorMap.js
@@ -21,11 +21,15 @@ Ext.define('amdaUI.ColorMap', { | @@ -21,11 +21,15 @@ Ext.define('amdaUI.ColorMap', { | ||
21 | init: function(config){ | 21 | init: function(config){ |
22 | var me = this; | 22 | var me = this; |
23 | var size = (typeof config !== "undefined" && config.size) ? config.size : '12'; | 23 | var size = (typeof config !== "undefined" && config.size) ? config.size : '12'; |
24 | + var hideFieldLabel = true; | ||
25 | + if (typeof config !== "undefined") { | ||
26 | + hideFieldLabel = (config.hideFieldLabel !== false); | ||
27 | + } | ||
24 | Ext.apply(this,{ | 28 | Ext.apply(this,{ |
25 | xtype:'combobox', | 29 | xtype:'combobox', |
26 | name: (typeof config !== "undefined" && config.name) ? config.name:null, | 30 | name: (typeof config !== "undefined" && config.name) ? config.name:null, |
27 | - fieldLabel: 'Color Map <img amda_clicktip="colourMaps" style="vertical-align:bottom" src="js/resources/images/16x16/info_mini.png"', | ||
28 | - store: new Ext.data.Store({ | 31 | + fieldLabel: hideFieldLabel ? '' : 'Color Map <img amda_clicktip="colourMaps" style="vertical-align:bottom" src="js/resources/images/16x16/info_mini.png"', |
32 | + store: new Ext.data.Store({ | ||
29 | fields: ['key','name', 'iconUrl'], | 33 | fields: ['key','name', 'iconUrl'], |
30 | data: me.data | 34 | data: me.data |
31 | }), | 35 | }), |
@@ -37,7 +41,7 @@ Ext.define('amdaUI.ColorMap', { | @@ -37,7 +41,7 @@ Ext.define('amdaUI.ColorMap', { | ||
37 | </div></tpl>', | 41 | </div></tpl>', |
38 | editable: false, | 42 | editable: false, |
39 | queryMode: 'local', | 43 | queryMode: 'local', |
40 | - onValueChange: config.onValueChange, | 44 | + onValueChange: (typeof config !== "undefined" && config.onValueChange) ? config.onValueChange : null, |
41 | listeners: { | 45 | listeners: { |
42 | change: function (combo, newValue, oldValue, eOpts) { | 46 | change: function (combo, newValue, oldValue, eOpts) { |
43 | var iconUrl=""; | 47 | var iconUrl=""; |
js/app/views/PlotComponents/PlotStandardForm.js
@@ -441,6 +441,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { | @@ -441,6 +441,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { | ||
441 | xtype: 'colormap', | 441 | xtype: 'colormap', |
442 | name: name, | 442 | name: name, |
443 | size: 26, | 443 | size: 26, |
444 | + hideFieldLabel: false, | ||
444 | onValueChange: function(name, newValue, oldValue) { | 445 | onValueChange: function(name, newValue, oldValue) { |
445 | me.object.set(name, newValue); | 446 | me.object.set(name, newValue); |
446 | if (onChange != null) | 447 | if (onChange != null) |