Commit b71f0e721b3cf998617147bc13b4b79b3cc99f42
1 parent
533ea933
Exists in
master
and in
19 other branches
Fix ColorPicker - cf. #11228
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
js/app/views/PlotComponents/PlotColorPicker.js
... | ... | @@ -47,6 +47,16 @@ Ext.define('amdaPlotComp.PlotColorPicker', { |
47 | 47 | select: function(picker, selColor, eOpts) { |
48 | 48 | this.colorDisplayer.setValue('#'+selColor); |
49 | 49 | }, |
50 | + show: function(menu, eOpts) { | |
51 | + var hex = me.rgbToHex(me.rgbColorPicker.rgbColor); | |
52 | + hex = hex.replace('#',''); | |
53 | + if (menu.picker.colors.indexOf(hex) < 0) { | |
54 | + menu.picker.clear(); | |
55 | + } | |
56 | + else { | |
57 | + menu.picker.select(hex, true); | |
58 | + } | |
59 | + }, | |
50 | 60 | scope: me |
51 | 61 | } |
52 | 62 | }); |
... | ... |