[Color palette] Hide recent color by default

This commit is contained in:
Julia Radzhabova 2022-04-28 12:53:33 +03:00
parent 5b2a65d2cb
commit ac5a4a1018
3 changed files with 7 additions and 6 deletions

View file

@ -55,13 +55,15 @@ define([
getPicker: function(color, colors) {
if (!this.colorPicker) {
this.colorPicker = new Common.UI.ThemeColorPalette({
var config = {
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
transparent: this.options.transparent,
hideEmptyColors: this.options.hideEmptyColors,
value: color,
colors: colors
});
};
(this.options.transparent!==undefined) && (config['transparent'] = this.options.transparent);
(this.options.hideEmptyColors!==undefined) && (config['hideEmptyColors'] = this.options.hideEmptyColors);
this.colorPicker = new Common.UI.ThemeColorPalette(config);
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
if (this.options.auto) {

View file

@ -54,7 +54,7 @@ define([
themecolors: 10,
columns: 10,
effects: 5,
hideEmptyColors: false,
hideEmptyColors: true,
allowReselect: true,
transparent: false,
value: '000000',

View file

@ -377,7 +377,6 @@ define([
split: true,
menu: true,
auto: true,
hideEmptyColors: true,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '0, -16'