[PE][SSE] Bug 40719
This commit is contained in:
parent
e02ef3e65f
commit
c28cca6fa3
|
@ -175,6 +175,8 @@ define([
|
|||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
this.GradColor.values = [0, 100];
|
||||
this.GradColor.colors = [this.GradColor.colors[0], this.GradColor.colors[this.GradColor.colors.length - 1]];
|
||||
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
|
||||
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
|
||||
|
||||
|
@ -468,14 +470,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
var arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
}
|
||||
props.put_fill(fill);
|
||||
this.api.ShapeApply(props);
|
||||
|
@ -512,14 +522,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
var arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
}
|
||||
props.put_fill(fill);
|
||||
this.api.ShapeApply(props);
|
||||
|
@ -739,7 +757,7 @@ define([
|
|||
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
|
||||
fill = fill.get_fill();
|
||||
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -787,7 +805,7 @@ define([
|
|||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
fill = fill.get_fill();
|
||||
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -818,49 +836,37 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var colors = fill.get_colors();
|
||||
if (colors && colors.length>0) {
|
||||
color = colors[0];
|
||||
var me = this;
|
||||
var colors = fill.get_colors(),
|
||||
positions = fill.get_positions(),
|
||||
length = colors.length;
|
||||
this.sldrGradient.setThumbs(length);
|
||||
if (this.GradColor.colors.length>length) {
|
||||
this.GradColor.colors.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.values.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.currentIdx = 0;
|
||||
}
|
||||
colors && colors.forEach(function(color, index) {
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
|
||||
me.GradColor.colors[index] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(me.GradColor.colors[index]);
|
||||
} else {
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
me.GradColor.colors[index] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[0] = '000000';
|
||||
me.GradColor.colors[index] = '000000';
|
||||
|
||||
color = colors[1];
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
|
||||
} else {
|
||||
this.GradColor.colors[1] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
|
||||
}
|
||||
var positions = fill.get_positions();
|
||||
if (positions && positions.length>0) {
|
||||
var position = positions[0];
|
||||
var position = positions[index];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[0] = position;
|
||||
}
|
||||
|
||||
position = positions[1];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[1] = position;
|
||||
me.GradColor.values[index] = position;
|
||||
}
|
||||
});
|
||||
for (var index=0; index<length; index++) {
|
||||
me.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(me.GradColor.colors[index]) == 'object') ? me.GradColor.colors[index].color : me.GradColor.colors[index]), index);
|
||||
me.sldrGradient.setValue(index, me.GradColor.values[index]);
|
||||
}
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[0]) == 'object') ? this.GradColor.colors[0].color : this.GradColor.colors[0]), 0);
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
|
||||
this.sldrGradient.setValue(0, this.GradColor.values[0]);
|
||||
this.sldrGradient.setValue(1, this.GradColor.values[1]);
|
||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
|
|
|
@ -295,6 +295,8 @@ define([
|
|||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
this.GradColor.values = [0, 100];
|
||||
this.GradColor.colors = [this.GradColor.colors[0], this.GradColor.colors[this.GradColor.colors.length - 1]];
|
||||
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
|
||||
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
|
||||
|
||||
|
@ -542,14 +544,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
var arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
}
|
||||
props.put_background(fill);
|
||||
this.api.SetSlideProps(props);
|
||||
|
@ -586,14 +596,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
var arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
}
|
||||
props.put_background(fill);
|
||||
this.api.SetSlideProps(props);
|
||||
|
@ -1119,7 +1137,7 @@ define([
|
|||
this.FGColor = (this.SlideColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color)} : {Value: 1, Color: '000000'};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
this.GradColor.colors[0] = (this.SlideColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.SlideColor.Color) : '000000';
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
|
||||
fill = fill.get_fill();
|
||||
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -1167,7 +1185,7 @@ define([
|
|||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
this.SlideColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
fill = fill.get_fill();
|
||||
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -1198,49 +1216,37 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var colors = fill.get_colors();
|
||||
if (colors && colors.length>0) {
|
||||
color = colors[0];
|
||||
var me = this;
|
||||
var colors = fill.get_colors(),
|
||||
positions = fill.get_positions(),
|
||||
length = colors.length;
|
||||
this.sldrGradient.setThumbs(length);
|
||||
if (this.GradColor.colors.length>length) {
|
||||
this.GradColor.colors.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.values.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.currentIdx = 0;
|
||||
}
|
||||
colors && colors.forEach(function(color, index) {
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
|
||||
me.GradColor.colors[index] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(me.GradColor.colors[index]);
|
||||
} else {
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
me.GradColor.colors[index] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[0] = '000000';
|
||||
me.GradColor.colors[index] = '000000';
|
||||
|
||||
color = colors[1];
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
|
||||
} else {
|
||||
this.GradColor.colors[1] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
|
||||
}
|
||||
var positions = fill.get_positions();
|
||||
if (positions && positions.length>0) {
|
||||
var position = positions[0];
|
||||
var position = positions[index];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[0] = position;
|
||||
}
|
||||
|
||||
position = positions[1];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[1] = position;
|
||||
me.GradColor.values[index] = position;
|
||||
}
|
||||
});
|
||||
for (var index=0; index<length; index++) {
|
||||
me.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(me.GradColor.colors[index]) == 'object') ? me.GradColor.colors[index].color : me.GradColor.colors[index]), index);
|
||||
me.sldrGradient.setValue(index, me.GradColor.values[index]);
|
||||
}
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[0]) == 'object') ? this.GradColor.colors[0].color : this.GradColor.colors[0]), 0);
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
|
||||
this.sldrGradient.setValue(0, this.GradColor.values[0]);
|
||||
this.sldrGradient.setValue(1, this.GradColor.values[1]);
|
||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
|
|
|
@ -169,6 +169,8 @@ define([
|
|||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
this.GradColor.values = [0, 100];
|
||||
this.GradColor.colors = [this.GradColor.colors[0], this.GradColor.colors[this.GradColor.colors.length - 1]];
|
||||
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
|
||||
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
|
||||
|
||||
|
@ -473,14 +475,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
var arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
|
@ -518,14 +528,22 @@ define([
|
|||
fill.put_type(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.put_fill( new Asc.asc_CFillGrad());
|
||||
fill.get_fill().put_grad_type(this.GradFillType);
|
||||
fill.get_fill().put_positions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
var arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.get_fill().put_positions(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.get_fill().put_linear_angle(this.GradLinearDirectionType * 60000);
|
||||
fill.get_fill().put_linear_scale(true);
|
||||
}
|
||||
fill.get_fill().put_colors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.get_fill().put_colors(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
|
@ -712,7 +730,7 @@ define([
|
|||
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
|
||||
fill = fill.get_fill();
|
||||
this.BlipFillType = fill.get_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -760,7 +778,7 @@ define([
|
|||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
fill = fill.get_fill();
|
||||
var gradfilltype = fill.get_grad_type(); // null - не совпадают у нескольких фигур
|
||||
|
@ -791,49 +809,37 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var colors = fill.get_colors();
|
||||
if (colors && colors.length>0) {
|
||||
color = colors[0];
|
||||
var me = this;
|
||||
var colors = fill.get_colors(),
|
||||
positions = fill.get_positions(),
|
||||
length = colors.length;
|
||||
this.sldrGradient.setThumbs(length);
|
||||
if (this.GradColor.colors.length>length) {
|
||||
this.GradColor.colors.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.values.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.currentIdx = 0;
|
||||
}
|
||||
colors && colors.forEach(function(color, index) {
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
|
||||
me.GradColor.colors[index] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(me.GradColor.colors[index]);
|
||||
} else {
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
me.GradColor.colors[index] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[0] = '000000';
|
||||
me.GradColor.colors[index] = '000000';
|
||||
|
||||
color = colors[1];
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
|
||||
} else {
|
||||
this.GradColor.colors[1] = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
|
||||
}
|
||||
var positions = fill.get_positions();
|
||||
if (positions && positions.length>0) {
|
||||
var position = positions[0];
|
||||
var position = positions[index];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[0] = position;
|
||||
}
|
||||
|
||||
position = positions[1];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[1] = position;
|
||||
me.GradColor.values[index] = position;
|
||||
}
|
||||
});
|
||||
for (var index=0; index<length; index++) {
|
||||
me.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(me.GradColor.colors[index]) == 'object') ? me.GradColor.colors[index].color : me.GradColor.colors[index]), index);
|
||||
me.sldrGradient.setValue(index, me.GradColor.values[index]);
|
||||
}
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[0]) == 'object') ? this.GradColor.colors[0].color : this.GradColor.colors[0]), 0);
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
|
||||
this.sldrGradient.setValue(0, this.GradColor.values[0]);
|
||||
this.sldrGradient.setValue(1, this.GradColor.values[1]);
|
||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
|
|
|
@ -177,6 +177,8 @@ define([
|
|||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
this.GradColor.values = [0, 100];
|
||||
this.GradColor.colors = [this.GradColor.colors[0], this.GradColor.colors[this.GradColor.colors.length - 1]];
|
||||
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
|
||||
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
|
||||
|
||||
|
@ -482,14 +484,22 @@ define([
|
|||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.asc_putFill( new Asc.asc_CFillGrad());
|
||||
fill.asc_getFill().asc_putGradType(this.GradFillType);
|
||||
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
var arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.asc_getFill().asc_putColors(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
|
||||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.asc_getFill().asc_putPositions(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.imgprops.asc_putShapeProperties(props);
|
||||
|
@ -527,14 +537,22 @@ define([
|
|||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.asc_putFill( new Asc.asc_CFillGrad());
|
||||
fill.asc_getFill().asc_putGradType(this.GradFillType);
|
||||
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
var arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.asc_getFill().asc_putPositions(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
|
||||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.asc_getFill().asc_putColors(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.imgprops.asc_putShapeProperties(props);
|
||||
|
@ -763,7 +781,7 @@ define([
|
|||
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
|
||||
fill = fill.asc_getFill();
|
||||
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
|
||||
|
@ -811,7 +829,7 @@ define([
|
|||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
fill = fill.asc_getFill();
|
||||
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
|
||||
|
@ -842,49 +860,37 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var colors = fill.asc_getColors();
|
||||
if (colors && colors.length>0) {
|
||||
color = colors[0];
|
||||
var me = this;
|
||||
var colors = fill.asc_getColors(),
|
||||
positions = fill.asc_getPositions(),
|
||||
length = colors.length;
|
||||
this.sldrGradient.setThumbs(length);
|
||||
if (this.GradColor.colors.length>length) {
|
||||
this.GradColor.colors.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.values.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.currentIdx = 0;
|
||||
}
|
||||
colors && colors.forEach(function(color, index) {
|
||||
if (color) {
|
||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
|
||||
me.GradColor.colors[index] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(me.GradColor.colors[index]);
|
||||
} else {
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
me.GradColor.colors[index] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[0] = '000000';
|
||||
me.GradColor.colors[index] = '000000';
|
||||
|
||||
color = colors[1];
|
||||
if (color) {
|
||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
|
||||
} else {
|
||||
this.GradColor.colors[1] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
|
||||
}
|
||||
var positions = fill.asc_getPositions();
|
||||
if (positions && positions.length>0) {
|
||||
var position = positions[0];
|
||||
var position = positions[index];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[0] = position;
|
||||
}
|
||||
|
||||
position = positions[1];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[1] = position;
|
||||
me.GradColor.values[index] = position;
|
||||
}
|
||||
});
|
||||
for (var index=0; index<length; index++) {
|
||||
me.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(me.GradColor.colors[index]) == 'object') ? me.GradColor.colors[index].color : me.GradColor.colors[index]), index);
|
||||
me.sldrGradient.setValue(index, me.GradColor.values[index]);
|
||||
}
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[0]) == 'object') ? this.GradColor.colors[0].color : this.GradColor.colors[0]), 0);
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
|
||||
this.sldrGradient.setValue(0, this.GradColor.values[0]);
|
||||
this.sldrGradient.setValue(1, this.GradColor.values[1]);
|
||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
|
|
|
@ -170,6 +170,8 @@ define([
|
|||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
this.GradColor.values = [0, 100];
|
||||
this.GradColor.colors = [this.GradColor.colors[0], this.GradColor.colors[this.GradColor.colors.length - 1]];
|
||||
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]).get_color().get_hex(),
|
||||
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1]).get_color().get_hex();
|
||||
|
||||
|
@ -474,14 +476,22 @@ define([
|
|||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.asc_putFill( new Asc.asc_CFillGrad());
|
||||
fill.asc_getFill().asc_putGradType(this.GradFillType);
|
||||
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
var arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.asc_getFill().asc_putColors(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
|
||||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.asc_getFill().asc_putPositions(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
|
@ -519,14 +529,22 @@ define([
|
|||
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_GRAD);
|
||||
fill.asc_putFill( new Asc.asc_CFillGrad());
|
||||
fill.asc_getFill().asc_putGradType(this.GradFillType);
|
||||
fill.asc_getFill().asc_putPositions([this.GradColor.values[0]*1000, this.GradColor.values[1]*1000]);
|
||||
var arr = [];
|
||||
this.GradColor.values.forEach(function(item){
|
||||
arr.push(item*1000);
|
||||
});
|
||||
fill.asc_getFill().asc_putPositions(arr);
|
||||
|
||||
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
|
||||
fill.asc_getFill().asc_putLinearAngle(this.GradLinearDirectionType * 60000);
|
||||
fill.asc_getFill().asc_putLinearScale(true);
|
||||
}
|
||||
fill.asc_getFill().asc_putColors([Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[0]), Common.Utils.ThemeColor.getRgbColor(this.GradColor.colors[1])]);
|
||||
arr = [];
|
||||
this.GradColor.colors.forEach(function(item){
|
||||
arr.push(Common.Utils.ThemeColor.getRgbColor(item));
|
||||
});
|
||||
fill.asc_getFill().asc_putColors(arr);
|
||||
}
|
||||
props.asc_putFill(fill);
|
||||
this.shapeprops.put_TextArtProperties(props);
|
||||
|
@ -716,7 +734,7 @@ define([
|
|||
this.FGColor = (this.ShapeColor.Color!=='transparent') ? {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color)} : {Value: 1, Color: '000000'};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
this.GradColor.colors[0] = (this.ShapeColor.Color!=='transparent') ? Common.Utils.ThemeColor.colorValue2EffectId(this.ShapeColor.Color) : '000000';
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_BLIP) {
|
||||
fill = fill.asc_getFill();
|
||||
this.BlipFillType = fill.asc_getType(); // null - не совпадают у нескольких фигур
|
||||
|
@ -764,7 +782,7 @@ define([
|
|||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||
this.ShapeColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color);
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
this.GradColor.colors[this.GradColor.colors.length-1] = 'ffffff';
|
||||
} else if (fill_type==Asc.c_oAscFill.FILL_TYPE_GRAD) {
|
||||
fill = fill.asc_getFill();
|
||||
var gradfilltype = fill.asc_getGradType(); // null - не совпадают у нескольких фигур
|
||||
|
@ -795,49 +813,37 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var colors = fill.asc_getColors();
|
||||
if (colors && colors.length>0) {
|
||||
color = colors[0];
|
||||
var me = this;
|
||||
var colors = fill.asc_getColors(),
|
||||
positions = fill.asc_getPositions(),
|
||||
length = colors.length;
|
||||
this.sldrGradient.setThumbs(length);
|
||||
if (this.GradColor.colors.length>length) {
|
||||
this.GradColor.colors.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.values.splice(length, this.GradColor.colors.length - length);
|
||||
this.GradColor.currentIdx = 0;
|
||||
}
|
||||
colors && colors.forEach(function(color, index) {
|
||||
if (color) {
|
||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[0] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[0]);
|
||||
me.GradColor.colors[index] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(me.GradColor.colors[index]);
|
||||
} else {
|
||||
this.GradColor.colors[0] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
me.GradColor.colors[index] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[0] = '000000';
|
||||
me.GradColor.colors[index] = '000000';
|
||||
|
||||
color = colors[1];
|
||||
if (color) {
|
||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
this.GradColor.colors[1] = {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue()};
|
||||
Common.Utils.ThemeColor.colorValue2EffectId(this.GradColor.colors[1]);
|
||||
} else {
|
||||
this.GradColor.colors[1] = Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB());
|
||||
}
|
||||
} else
|
||||
this.GradColor.colors[1] = 'ffffff';
|
||||
|
||||
}
|
||||
var positions = fill.asc_getPositions();
|
||||
if (positions && positions.length>0) {
|
||||
var position = positions[0];
|
||||
var position = positions[index];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[0] = position;
|
||||
}
|
||||
|
||||
position = positions[1];
|
||||
if (position!==null) {
|
||||
position = position/1000;
|
||||
this.GradColor.values[1] = position;
|
||||
me.GradColor.values[index] = position;
|
||||
}
|
||||
});
|
||||
for (var index=0; index<length; index++) {
|
||||
me.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(me.GradColor.colors[index]) == 'object') ? me.GradColor.colors[index].color : me.GradColor.colors[index]), index);
|
||||
me.sldrGradient.setValue(index, me.GradColor.values[index]);
|
||||
}
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[0]) == 'object') ? this.GradColor.colors[0].color : this.GradColor.colors[0]), 0);
|
||||
this.sldrGradient.setColorValue(Common.Utils.String.format('#{0}', (typeof(this.GradColor.colors[1]) == 'object') ? this.GradColor.colors[1].color : this.GradColor.colors[1]), 1);
|
||||
this.sldrGradient.setValue(0, this.GradColor.values[0]);
|
||||
this.sldrGradient.setValue(1, this.GradColor.values[1]);
|
||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||
this.FGColor = {Value: 1, Color: this.GradColor.colors[0]};
|
||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||
|
|
Loading…
Reference in a new issue