Color palette: fix custom color after clearing local storage
This commit is contained in:
parent
0c09154162
commit
bbb3b053f5
|
@ -171,6 +171,7 @@ define([
|
|||
if (color) { // custom color was selected
|
||||
color = color.toUpperCase();
|
||||
selected.removeClass(this.selectedCls);
|
||||
this.lastSelectedIdx = -1;
|
||||
}
|
||||
|
||||
var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom');
|
||||
|
@ -189,6 +190,15 @@ define([
|
|||
color = undefined; //select only first found color
|
||||
}
|
||||
}
|
||||
while (i < this.options.dynamiccolors) {
|
||||
colorEl = el.find('.color-dynamic-'+ i);
|
||||
colorEl.removeAttr('color');
|
||||
colorEl.addClass('dynamic-empty-color');
|
||||
colorEl.find('span').css({
|
||||
'background-color': 'transparent'
|
||||
});
|
||||
i++;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue