Commit 20c511fb authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Поправила setPosition для mathText (из-за последних правок just-draw элементы...

Поправила setPosition для mathText (из-за последних правок just-draw элементы отображались в некорректной позции)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58001 954022d7-b5bf-4e40-9824-e11837661b57
parent 6f3f07c1
......@@ -7726,26 +7726,28 @@ ParaRun.prototype.old_Math_SetPosition = function(pos, PosInfo, CurrWPoints)
}
ParaRun.prototype.Math_SetPosition = function(PosInfo)
{
var NewPos = new CMathPosition();
var x = PosInfo.x,
y = PosInfo.y - this.size.ascent;
if(this.bEqqArray)
{
for(var Pos = 0; Pos < this.Content.length; Pos++)
{
var CurrElem = this.Content[Pos];
var NewPos = new CMathPosition();
NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent;
if(this.Content[Pos].Type == para_Math_Ampersand)
{
PosInfo.UpdatePoint();
PosInfo.ApplyAlign();
CurrElem.setPosition(PosInfo.x, y);
CurrElem.setPosition(NewPos);
}
else
{
CurrElem.setPosition(PosInfo.x, y);
CurrElem.setPosition(NewPos);
}
PosInfo.UpdateX(CurrElem.size.width);
......@@ -7897,7 +7899,12 @@ ParaRun.prototype.Math_SetPosition = function(PosInfo)
{
for(var i = 0; i < this.Content.length; i++)
{
this.Content[i].setPosition(PosInfo.x, y);
var NewPos = new CMathPosition();
NewPos.x = PosInfo.x;
NewPos.y = PosInfo.y - this.size.ascent;
this.Content[i].setPosition(NewPos);
PosInfo.x += this.Content[i].size.width;
}
......
......@@ -4303,7 +4303,7 @@ CMathContent.prototype =
setPosition: function(PosInfo)
{
this.pos.x = PosInfo.x;
this.pos.y = PosInfo.y ;
this.pos.y = PosInfo.y;
/*var x = pos.x,
y = pos.y + this.size.ascent; */
......
......@@ -559,19 +559,19 @@ CMathText.prototype =
pGraphics.FillTextCode(X, Y, this.getCode()); //на отрисовку символа отправляем положение baseLine
},
setPosition: function(X, Y)
setPosition: function(pos)
{
try
{
if (!this.bJDraw) // for text
{
this.pos.x = X + this.GapLeft;
this.pos.y = Y;
this.pos.x = pos.x + this.GapLeft;
this.pos.y = pos.y;
}
else // for symbol only drawing
{
this.pos.x = X - this.rasterOffsetX;
this.pos.y = Y - this.rasterOffsetY + this.size.ascent;
this.pos.x = pos.x - this.rasterOffsetX;
this.pos.y = pos.y - this.rasterOffsetY + this.size.ascent;
}
}
catch(e)
......@@ -751,13 +751,13 @@ CMathAmp.prototype =
};
}
},
setPosition: function(X, Y)
setPosition: function(pos)
{
this.pos.x = X;
this.pos.y = Y;
this.pos.x = pos.x;
this.pos.y = pos.y;
if(this.bEqqArray==false)
this.AmpText.setPosition(X, Y);
this.AmpText.setPosition(pos);
},
draw: function(x, y, pGraphics)
{
......
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