Commit c24cc494 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с неправильным селектом и позиционированием курсора в CEqArray.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59296 954022d7-b5bf-4e40-9824-e11837661b57
parent 0c92bfa1
......@@ -1650,7 +1650,17 @@ ParaMath.prototype.Get_ContentSelection = function()
if (oContent.bRoot)
return null;
return {X : oContent.pos.x + this.X, Y : oContent.pos.y + this.Y, W : oContent.size.width, H : oContent.size.height};
var X = oContent.pos.x + this.X;
var Y = oContent.pos.y + this.Y;
if(oContent.RecalcInfo.bEqqArray)
{
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(oContent.InfoPoints);
X += PointInfo.GetAlign();
}
return {X : X, Y : Y, W : oContent.size.width, H : oContent.size.height};
};
/**
......
......@@ -12771,6 +12771,8 @@ function CParagraphSearchPosXY()
this.DiffX = 1000000; // километра для ограничения должно хватить
this.NumberingDiffX = 1000000; // километра для ограничения должно хватить
this.EqArrayInfoPoints = null; // Специальный параметр для EqArray в формулах
this.Line = 0;
this.Range = 0;
......
......@@ -3774,18 +3774,12 @@ ParaRun.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine,
var TempDx = 0;
if(para_Math_Ampersand === ItemType && this.bEqqArray)
if(para_Math_Ampersand === ItemType && null !== SearchPos.EqArrayInfoPoints)
{
if (null !== this.Parent)
{
var PointsInfo = new CMathPointInfo();
PointsInfo.SetInfoPoints(this.Parent.InfoPoints);
PointsInfo.NextAlignRange();
TempDx = PointsInfo.GetAlign();
}
SearchPos.EqArrayInfoPoints.NextAlignRange();
TempDx = SearchPos.EqArrayInfoPoints.GetAlign();
}
else if ( para_Drawing != ItemType || true === Item.Is_Inline() )
else if (para_Drawing != ItemType || true === Item.Is_Inline())
{
TempDx = Item.Get_WidthVisible();
}
......
......@@ -3040,10 +3040,18 @@ CMathContent.prototype.Get_Bounds = function()
var X = 0, Y = 0, W = 0, H = 0;
if (null !== this.ParaMath)
{
X = this.ParaMath.X + this.pos.x;
Y = this.ParaMath.Y + this.pos.y;
W = this.size.width;
H = this.size.height;
if (this.RecalcInfo.bEqqArray)
{
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(this.InfoPoints);
X += PointInfo.GetAlign();
}
}
return {X : X, Y : Y, W : W, H : H};
......@@ -3079,11 +3087,13 @@ CMathContent.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurL
if (nLength <= 0)
return false;
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(this.InfoPoints);
if(this.RecalcInfo.bEqqArray)
SearchPos.CurX += PointInfo.GetAlign();
if (this.RecalcInfo.bEqqArray)
{
SearchPos.EqArrayInfoPoints = new CMathPointInfo();
SearchPos.EqArrayInfoPoints.SetInfoPoints(this.InfoPoints);
}
else
SearchPos.EqArrayInfoPoints = null;
var bResult = false;
for (var nPos = 0; nPos < nLength; nPos++)
......
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