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