[SSE] Fix color for formatting rules
This commit is contained in:
parent
e8e8520f98
commit
291417d667
|
@ -784,11 +784,18 @@ define([
|
||||||
subtype = this.subtype;
|
subtype = this.subtype;
|
||||||
|
|
||||||
var setColor = function(color, control) {
|
var setColor = function(color, control) {
|
||||||
color = Common.Utils.ThemeColor.colorValue2EffectId(color);
|
if (color) {
|
||||||
|
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
|
color = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
||||||
|
} else {
|
||||||
|
color = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
control.setColor(color);
|
control.setColor(color);
|
||||||
if (_.isObject(color)) {
|
if (_.isObject(color)) {
|
||||||
var isselected = false;
|
var isselected = false;
|
||||||
for (var j = 0; j < 10; j++) {
|
for (var i = 0; i < 10; i++) {
|
||||||
if (Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue) {
|
if (Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue) {
|
||||||
control.colorPicker.select(color, true);
|
control.colorPicker.select(color, true);
|
||||||
isselected = true;
|
isselected = true;
|
||||||
|
@ -847,7 +854,7 @@ define([
|
||||||
for (var i=0; i<scales.length; i++) {
|
for (var i=0; i<scales.length; i++) {
|
||||||
var scaletype = scales[i].asc_getType(),
|
var scaletype = scales[i].asc_getType(),
|
||||||
val = scales[i].asc_getVal(),
|
val = scales[i].asc_getVal(),
|
||||||
color = Common.Utils.ThemeColor.colorValue2EffectId(colors[i]),
|
color = colors[i],
|
||||||
controls = arr[i];
|
controls = arr[i];
|
||||||
controls.combo.setValue(scaletype);
|
controls.combo.setValue(scaletype);
|
||||||
controls.range.setDisabled(scaletype == Asc.c_oAscCfvoType.Minimum || scaletype == Asc.c_oAscCfvoType.Maximum);
|
controls.range.setDisabled(scaletype == Asc.c_oAscCfvoType.Minimum || scaletype == Asc.c_oAscCfvoType.Maximum);
|
||||||
|
|
Loading…
Reference in a new issue