Commit 3913601a authored by Ilya.Kirillov's avatar Ilya.Kirillov

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

Исправлен баг с необновлением позиций селекта и курсора после совместного редактирования параграфа(баг 27110). Исправлен баг с позиционированием курсора в формуле при совместном редаватировании (баг 27116). Исправлен баг с неперсчетом формулы в совместном редактировании (27109).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59017 954022d7-b5bf-4e40-9824-e11837661b57
parent 81e02547
...@@ -10925,6 +10925,8 @@ Paragraph.prototype = ...@@ -10925,6 +10925,8 @@ Paragraph.prototype =
} }
} }
this.private_ResetSelection();
break; break;
} }
...@@ -10946,6 +10948,8 @@ Paragraph.prototype = ...@@ -10946,6 +10948,8 @@ Paragraph.prototype =
this.Content.splice( ChangesPos, 1 ); this.Content.splice( ChangesPos, 1 );
} }
this.private_ResetSelection();
break; break;
} }
...@@ -12069,6 +12073,16 @@ Paragraph.prototype = ...@@ -12069,6 +12073,16 @@ Paragraph.prototype =
} }
}; };
Paragraph.prototype.private_ResetSelection = function()
{
this.Selection.StartPos = 0;
this.Selection.EndPos = 0;
this.Selection.StartManually = false;
this.Selection.EndManually = false;
this.CurPos.ContentPos = 0;
};
var pararecalc_0_All = 0; var pararecalc_0_All = 0;
var pararecalc_0_None = 1; var pararecalc_0_None = 1;
......
...@@ -1899,6 +1899,8 @@ CMathContent.prototype = ...@@ -1899,6 +1899,8 @@ CMathContent.prototype =
this.content.splice(Pos, 0, Element); this.content.splice(Pos, 0, Element);
} }
this.private_SetNeedResize();
break; break;
} }
case historyitem_Math_RemoveItem: case historyitem_Math_RemoveItem:
...@@ -1914,6 +1916,8 @@ CMathContent.prototype = ...@@ -1914,6 +1916,8 @@ CMathContent.prototype =
this.content.splice(ChangesPos, 1); this.content.splice(ChangesPos, 1);
} }
this.private_SetNeedResize();
break; break;
} }
} }
...@@ -3872,10 +3876,23 @@ CMathContent.prototype.Get_ParaContentPos = function(bSelection, bStart, Content ...@@ -3872,10 +3876,23 @@ CMathContent.prototype.Get_ParaContentPos = function(bSelection, bStart, Content
}; };
CMathContent.prototype.Set_ParaContentPos = function(ContentPos, Depth) CMathContent.prototype.Set_ParaContentPos = function(ContentPos, Depth)
{ {
this.CurPos = ContentPos.Get(Depth); var CurPos = ContentPos.Get(Depth);
if(undefined !== this.content[this.CurPos]) // Делаем такие проверки, потому что после совместного редактирования, позиция может остаться старой, а
// контент измениться.
if (CurPos >= this.content.length - 1)
{ {
this.CurPos = this.content.length - 1;
this.content[this.CurPos].Cursor_MoveToEndPos(false);
}
else if (CurPos < 0)
{
this.CurPos = 0;
this.content[this.CurPos].Cursor_MoveToStartPos();
}
else
{
this.CurPos = ContentPos.Get(Depth);
this.content[this.CurPos].Set_ParaContentPos(ContentPos, Depth + 1); this.content[this.CurPos].Set_ParaContentPos(ContentPos, Depth + 1);
} }
}; };
...@@ -4441,4 +4458,9 @@ CMathContent.prototype.Check_NearestPos = function(ParaNearPos, Depth) ...@@ -4441,4 +4458,9 @@ CMathContent.prototype.Check_NearestPos = function(ParaNearPos, Depth)
var CurPos = ParaNearPos.NearPos.ContentPos.Get(Depth); var CurPos = ParaNearPos.NearPos.ContentPos.Get(Depth);
this.content[CurPos].Check_NearestPos(ParaNearPos, Depth + 1); this.content[CurPos].Check_NearestPos(ParaNearPos, Depth + 1);
};
CMathContent.prototype.private_SetNeedResize = function()
{
if (null !== this.ParaMath)
this.ParaMath.SetNeedResize();
}; };
\ No newline at end of file
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