Commit 926c3511 authored by Anna Pavlova's avatar Anna Pavlova

Поправлено выравнивание числителя и знаменателя дроби . Относится к коммиту...

Поправлено выравнивание числителя и знаменателя дроби . Относится к коммиту 98f68569 [98f68569]  Bug # 28463.
parent 54826131
...@@ -90,12 +90,10 @@ CFraction.prototype.drawBarFraction = function(PDSE) ...@@ -90,12 +90,10 @@ CFraction.prototype.drawBarFraction = function(PDSE)
var numHeight = this.elements[0][0].size.height; var numHeight = this.elements[0][0].size.height;
var width = this.size.width - this.GapLeft - this.GapRight;
var PosLine = this.ParaMath.GetLinePosition(PDSE.Line, PDSE.Range); var PosLine = this.ParaMath.GetLinePosition(PDSE.Line, PDSE.Range);
var x1 = this.pos.x + PosLine.x + this.GapLeft, var x1 = this.pos.x + PosLine.x + this.GapLeft,
x2 = this.pos.x + PosLine.x + this.GapLeft + width, x2 = this.pos.x + PosLine.x + this.size.width - this.GapRight,
y1 = this.pos.y + PosLine.y + numHeight - penW; y1 = this.pos.y + PosLine.y + numHeight - penW;
if(this.Pr.type == BAR_FRACTION) if(this.Pr.type == BAR_FRACTION)
...@@ -503,10 +501,12 @@ CFraction.prototype.align = function(pos_x, pos_y) ...@@ -503,10 +501,12 @@ CFraction.prototype.align = function(pos_x, pos_y)
if(this.Pr.type == BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION) if(this.Pr.type == BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION)
{ {
var width = this.size.width - this.GapLeft - this.GapRight;
if(pos_x == 0) if(pos_x == 0)
PosAlign.x = (this.size.width - this.Numerator.size.width)*0.5; PosAlign.x = (width - this.Numerator.size.width)*0.5;
else else
PosAlign.x = (this.size.width - this.Denominator.size.width)*0.5; PosAlign.x = (width - this.Denominator.size.width)*0.5;
} }
else if(this.Pr.type == LINEAR_FRACTION) else if(this.Pr.type == LINEAR_FRACTION)
{ {
......
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