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

1. Исправлены баги : падение из-за некорректного вызова функции

2. Исправлены баги связанные с отрисовкой текста/знака параграфа после delimiters и пр

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61114 954022d7-b5bf-4e40-9824-e11837661b57
parent a1edbef0
......@@ -165,11 +165,11 @@ CAccentDoubleLine.prototype.calcSize = function(stretch)
var Line = new CMathText(true);
Line.add(0x305);
Line.Resize(g_oTextMeasurer);
Line.Measure(g_oTextMeasurer);
var DoubleLine = new CMathText(true);
DoubleLine.add(0x33F);
DoubleLine.Resize(g_oTextMeasurer);
DoubleLine.Measure(g_oTextMeasurer);
this.diff = DoubleLine.size.ascent - Line.size.ascent;
......@@ -594,6 +594,8 @@ CAccent.prototype.draw = function(x, y, pGraphics, PDSE)
};
CAccent.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var oBase = this.Content[0];
oBase.Draw_Elements(PDSE);
......@@ -615,6 +617,8 @@ CAccent.prototype.Draw_Elements = function(PDSE)
}
this.operator.draw(x, y, PDSE.Graphics, PDSE);
PDSE.X = X + this.size.width;
};
CAccent.prototype.GetLastElement = function()
{
......
......@@ -203,6 +203,8 @@ CBorderBox.prototype.recalculateSize = function()
}
CBorderBox.prototype.Draw_Elements = function(PDSE)
{
var _X = PDSE.X;
this.Content[0].Draw_Elements(PDSE);
var penW = this.Get_TxtPrControlLetter().FontSize*0.02;
......@@ -215,10 +217,6 @@ CBorderBox.prototype.Draw_Elements = function(PDSE)
var X = this.pos.x + PosLine.x + this.GapLeft,
Y = this.pos.y + PosLine.y;
/*var X = this.pos.x + PDSE.X + this.GapLeft,
Y = this.pos.y + PDSE.Y;*/
this.Make_ShdColor(PDSE, this.Get_CompiledCtrPrp());
if(!this.Pr.hideTop)
......@@ -358,6 +356,8 @@ CBorderBox.prototype.Draw_Elements = function(PDSE)
PDSE.Graphics.drawVerLine(0, x1, y1, y2, penW);
}
PDSE.X = _X + this.size.width;
}
CBorderBox.prototype.setPosition = function(pos, PDSE)
{
......
......@@ -71,12 +71,16 @@ CFraction.prototype.draw = function(x, y, pGraphics, PDSE)
}
CFraction.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
if(this.Pr.type == BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION)
this.drawBarFraction(PDSE);
else if(this.Pr.type == SKEWED_FRACTION)
this.drawSkewedFraction(PDSE);
else if(this.Pr.type == LINEAR_FRACTION)
this.drawLinearFraction(PDSE);
PDSE.X = X + this.size.width;
}
CFraction.prototype.drawBarFraction = function(PDSE)
{
......
......@@ -694,9 +694,9 @@ CNaryOperator.prototype.Draw_Elements = function(PDSE)
if(this.Type == para_Math_Text)
this.drawTextElem(PosLine.x, PosLine.y, PDSE.Graphics);
else
this.drawGlyph(PosLine.x, PosLine.y, PDSE.Graphics);
this.drawGlyph(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
}
CNaryOperator.prototype.drawGlyph = function(x, y, pGraphics)
CNaryOperator.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var coord = this.getCoord();
......@@ -1946,7 +1946,7 @@ function CContourIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CContourIntegral, CNaryOperator);
CContourIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CContourIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var circle = new CCircle();
var coord = circle.getCoord();
......@@ -2032,7 +2032,7 @@ function CSurfaceIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CSurfaceIntegral, CNaryOperator);
CSurfaceIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CSurfaceIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var surf = new CSurface();
var coord = surf.getCoord();
......@@ -2117,7 +2117,7 @@ function CVolumeIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CVolumeIntegral, CNaryOperator);
CVolumeIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CVolumeIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var volume = new CVolume();
var coord = volume.getCoord();
......
......@@ -3825,6 +3825,8 @@ CDelimiter.prototype.setPosition = function(position, PDSE)
}
CDelimiter.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var PosLine = this.ParaMath.GetLinePosition(PDSE.Line);
this.begOper.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
......@@ -3833,6 +3835,8 @@ CDelimiter.prototype.Draw_Elements = function(PDSE)
for(var j = 0; j < this.nCol; j++)
this.elements[0][j].Draw_Elements(PDSE);
PDSE.X = X + this.size.width;
}
CDelimiter.prototype.align_2 = function(element)
{
......@@ -3965,6 +3969,8 @@ CCharacter.prototype.setPosition = function(pos, PDSE)
}
CCharacter.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
this.Content[0].Draw_Elements(PDSE);
var ctrPrp = this.Get_TxtPrControlLetter();
......@@ -3984,6 +3990,7 @@ CCharacter.prototype.Draw_Elements = function(PDSE)
this.operator.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
PDSE.X = X + this.size.width;
}
CCharacter.prototype.getBase = function()
{
......
......@@ -637,10 +637,14 @@ CRadical.prototype.setPosition = function(pos, PDSE)
}
CRadical.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var PosLine = this.ParaMath.GetLinePosition(PDSE.Line);
this.signRadical.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
CRadical.superclass.Draw_Elements.call(this, PDSE);
PDSE.X = X + this.size.width;
}
CRadical.prototype.getBase = 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