Commit 489835ff authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66997 954022d7-b5bf-4e40-9824-e11837661b57
parent 5c8e5e25
...@@ -2263,6 +2263,9 @@ CGs.prototype = ...@@ -2263,6 +2263,9 @@ CGs.prototype =
compare: function(gs) compare: function(gs)
{ {
if( gs.pos === this.pos){
return null;
}
var compare_unicolor = this.color.compare(gs.color); var compare_unicolor = this.color.compare(gs.color);
if(!isRealObject(compare_unicolor)) if(!isRealObject(compare_unicolor))
{ {
...@@ -2270,7 +2273,7 @@ CGs.prototype = ...@@ -2270,7 +2273,7 @@ CGs.prototype =
} }
var ret = new CGs(); var ret = new CGs();
ret.color = compare_unicolor; ret.color = compare_unicolor;
ret.pos = gs.pos === this.pos ? this.pos : 0; ret.pos = gs.pos === this.pos ? this.pos : undefined;
return ret; return ret;
} }
}; };
......
...@@ -2938,7 +2938,7 @@ function CreateAscFill(unifill) ...@@ -2938,7 +2938,7 @@ function CreateAscFill(unifill)
ret.fill.LinearAngle = _fill.lin.angle; ret.fill.LinearAngle = _fill.lin.angle;
ret.fill.LinearScale = _fill.lin.scale; ret.fill.LinearScale = _fill.lin.scale;
} }
else else if(_fill.path)
{ {
ret.fill.GradType = c_oAscFillGradType.GRAD_PATH; ret.fill.GradType = c_oAscFillGradType.GRAD_PATH;
ret.fill.PathType = 0; ret.fill.PathType = 0;
...@@ -3099,10 +3099,16 @@ function CorrectUniFill(asc_fill, unifill, editorId) ...@@ -3099,10 +3099,16 @@ function CorrectUniFill(asc_fill, unifill, editorId)
{ {
if (_colors.length == _positions.length) if (_colors.length == _positions.length)
{ {
ret.fill.colors.splice(0, ret.fill.colors.length); if(ret.fill.colors.length === _colors.length){
for (var i = 0; i < _colors.length; i++){
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(); var _gs = new CGs();
_gs.color = CorrectUniColor(_colors[i], _gs.color, editorId); _gs.color = CorrectUniColor(_colors[i], _gs.color, editorId);
_gs.pos = _positions[i]; _gs.pos = _positions[i];
...@@ -3111,6 +3117,7 @@ function CorrectUniFill(asc_fill, unifill, editorId) ...@@ -3111,6 +3117,7 @@ function CorrectUniFill(asc_fill, unifill, editorId)
} }
} }
} }
}
else if (undefined != _colors) else if (undefined != _colors)
{ {
if (_colors.length == ret.fill.colors.length) if (_colors.length == ret.fill.colors.length)
......
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