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

Поправила баг с рамкой : неправильно вычислялась высота контента

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61745 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a730b52
...@@ -969,9 +969,6 @@ ParaMath.prototype.UpdateWidthLine = function(PRS, Width) ...@@ -969,9 +969,6 @@ ParaMath.prototype.UpdateWidthLine = function(PRS, Width)
}; };
ParaMath.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange, _CurPage) ParaMath.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange, _CurPage)
{ {
var CurLine = _CurLine - this.Root.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.Root.StartRange : _CurRange );
// до пересчета Bounds для текущей строки ранее должны быть вызваны Recalculate_Range_Width (для ширины), Recalculate_LineMetrics(для высоты и аскента) // до пересчета Bounds для текущей строки ранее должны быть вызваны Recalculate_Range_Width (для ширины), Recalculate_LineMetrics(для высоты и аскента)
var pos = new CMathPosition(); var pos = new CMathPosition();
......
...@@ -2138,23 +2138,10 @@ CMathBounds.prototype.CheckLineBound = function(Line) ...@@ -2138,23 +2138,10 @@ CMathBounds.prototype.CheckLineBound = function(Line)
this.Bounds[Line] = new CMathBoundsMeasures(); this.Bounds[Line] = new CMathBoundsMeasures();
} }
}; };
CMathBounds.prototype.UpdateMetrics = function(Line, Object) CMathBounds.prototype.UpdateMetrics = function(Line, Metric)
{ {
this.CheckLineBound(Line); this.CheckLineBound(Line);
this.Bounds[Line].UpdateMetrics(Metric);
if(Object.Type == MATH_SIZE)
{
var Metric = new CMathBoundsMeasures();
Metric.H = Object.height;
Metric.Asc = Object.ascent;
this.Bounds[Line].UpdateMetrics(Metric);
}
else
{
this.Bounds[Line].UpdateMetrics(Object);
}
}; };
CMathBounds.prototype.UpdateWidth = function(Line, Width) CMathBounds.prototype.UpdateWidth = function(Line, Width)
{ {
...@@ -2239,7 +2226,13 @@ CMathBoundsMeasures.prototype.UpdateMetrics = function(Metric) ...@@ -2239,7 +2226,13 @@ CMathBoundsMeasures.prototype.UpdateMetrics = function(Metric)
this.Asc = MetricAsc; this.Asc = MetricAsc;
if(Descent < MetricDescent) if(Descent < MetricDescent)
{
this.H = MetricDescent + this.Asc; this.H = MetricDescent + this.Asc;
}
else
{
this.H = Descent + this.Asc;
}
}; };
CMathBoundsMeasures.prototype.UpdateWidth = function(Width) CMathBoundsMeasures.prototype.UpdateWidth = function(Width)
{ {
......
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