Commit 108e2296 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

поправила пересчет позициции для recalculateSize (для CMathContent)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55179 954022d7-b5bf-4e40-9824-e11837661b57
parent 723a6059
...@@ -6184,18 +6184,18 @@ CMathContent.prototype = ...@@ -6184,18 +6184,18 @@ CMathContent.prototype =
{ {
this.pos = {x: pos.x, y: pos.y}; this.pos = {x: pos.x, y: pos.y};
for(var i=1; i < this.content.length;i++) var _pos = {x: pos.x, y: pos.y + this.size.ascent }; // y по baseline;
for(var i=0; i < this.content.length; i++)
{ {
var t = _pos.x += this.content[i].gaps.left;
{
x: this.pos.x + this.content[i-1].widthToEl + this.content[i].gaps.left,
y: this.pos.y + this.size.ascent //baseline
};
if(this.content[i].value.typeObj == MATH_PARA_RUN) if(this.content[i].value.typeObj == MATH_PARA_RUN)
this.content[i].value.Math_SetPosition(pos); this.content[i].value.Math_SetPosition(_pos);
else else
this.content[i].value.setPosition(t); this.content[i].value.setPosition(_pos);
_pos.x += this.content[i].value.size.width;
} }
}, },
old_drawSelect: function() old_drawSelect: function()
......
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