Commit 063da3da authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

сравненеие градиентных заливок

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66997 954022d7-b5bf-4e40-9824-e11837661b57
parent 2b3a4229
......@@ -2263,6 +2263,9 @@ CGs.prototype =
compare: function(gs)
{
if( gs.pos === this.pos){
return null;
}
var compare_unicolor = this.color.compare(gs.color);
if(!isRealObject(compare_unicolor))
{
......@@ -2270,7 +2273,7 @@ CGs.prototype =
}
var ret = new CGs();
ret.color = compare_unicolor;
ret.pos = gs.pos === this.pos ? this.pos : 0;
ret.pos = gs.pos === this.pos ? this.pos : undefined;
return ret;
}
};
......
......@@ -2938,7 +2938,7 @@ function CreateAscFill(unifill)
ret.fill.LinearAngle = _fill.lin.angle;
ret.fill.LinearScale = _fill.lin.scale;
}
else
else if(_fill.path)
{
ret.fill.GradType = c_oAscFillGradType.GRAD_PATH;
ret.fill.PathType = 0;
......@@ -3099,15 +3099,22 @@ function CorrectUniFill(asc_fill, unifill, editorId)
{
if (_colors.length == _positions.length)
{
ret.fill.colors.splice(0, ret.fill.colors.length);
for (var i = 0; i < _colors.length; i++)
{
var _gs = new CGs();
_gs.color = CorrectUniColor(_colors[i], _gs.color, editorId);
_gs.pos = _positions[i];
if(ret.fill.colors.length === _colors.length){
for (var i = 0; i < _colors.length; i++){
var _gs = ret.fill.colors[i] ? ret.fill.colors[i] : new CGs();
_gs.color = CorrectUniColor(_colors[i], _gs.color, editorId);
_gs.pos = _positions[i];
ret.fill.colors[i] = _gs;
}
}
else{
for (var i = 0; i < _colors.length; i++){
var _gs = new CGs();
_gs.color = CorrectUniColor(_colors[i], _gs.color, editorId);
_gs.pos = _positions[i];
ret.fill.colors.push(_gs);
ret.fill.colors.push(_gs);
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment