Commit 0f8fbfc4 authored by Anna.Pavlova's avatar Anna.Pavlova

Реализовала разбивку на строки для DegreeSubSup

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62086 954022d7-b5bf-4e40-9824-e11837661b57
parent 16a9ee9a
......@@ -1429,15 +1429,7 @@ CMathBase.prototype.Selection_DrawRange = function(_CurLine, _CurRange, Selectio
// для каждой новой строки в ParaMath FindStart будет true независимо от того нашли или нет начало селекта на предыдущей строке
// поэтому для контентов разбивающихся на несколько строк сделаем проверку, чтобы не попасть в контенты, которые не относятся к текущей строке
var ContentSelect = true;
if(this.bOneLine == false)
{
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
ContentSelect = SelectionStartPos >= StartPos && SelectionEndPos <= EndPos;
}
var ContentSelect = this.IsContentSelect(SelectionStartPos, SelectionEndPos, _CurLine, _CurRange);
if(SelectionUse == true && SelectionStartPos !== SelectionEndPos)
{
......@@ -1486,6 +1478,23 @@ CMathBase.prototype.Selection_DrawRange = function(_CurLine, _CurRange, Selectio
}
};
CMathBase.prototype.IsContentSelect = function(SelectionStartPos, SelectionEndPos, _CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var ContentSelect = true;
if(this.bOneLine == false)
{
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
ContentSelect = SelectionStartPos >= StartPos && SelectionEndPos <= EndPos;
}
return ContentSelect;
};
CMathBase.prototype.Selection_IsEmpty = function()
{
if (true !== this.Selection.Use)
......
This diff is collapsed.
......@@ -478,10 +478,7 @@ CNary.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if(CurLine == 0 && CurRange == 0)
{
PRS.WordLen += this.BrGapLeft;
}
if(CurLine == 0 && CurRange == 0)
{
if(this.Base.IsJustDraw())
{
this.MeasureJustDraw(this.Base);
......
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