Commit e2fca2fb authored by Ilya.Kirillov's avatar Ilya.Kirillov

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

Исправлен баг с обновлением позиций (баг 25685). Исправлен баг в функции Paragraph.Is_ThisElementCurrent (баг 25583). Исправлен баг 25695.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57483 954022d7-b5bf-4e40-9824-e11837661b57
parent d78224a3
......@@ -454,14 +454,29 @@ Paragraph.prototype =
this.Content.splice( Pos, 0, Item );
if ( this.CurPos.ContentPos >= Pos )
{
this.CurPos.ContentPos++;
if ( this.CurPos.ContentPos >= this.Content.length )
this.CurPos.ContentPos = this.Content.length - 1;
}
if ( this.Selection.StartPos >= Pos )
{
this.Selection.StartPos++;
if ( this.Selection.StartPos >= this.Content.length )
this.Selection.StartPos = this.Content.length - 1;
}
if ( this.Selection.EndPos >= Pos )
{
this.Selection.EndPos++;
if ( this.Selection.EndPos >= this.Content.length )
this.Selection.EndPos = this.Content.length - 1;
}
// Обновляем позиции в NearestPos
var NearPosLen = this.NearPosArray.length;
for ( var Index = 0; Index < NearPosLen; Index++ )
......@@ -546,13 +561,28 @@ Paragraph.prototype =
this.Content.splice( Pos, 1 );
if ( this.Selection.StartPos > Pos )
{
this.Selection.StartPos--;
if ( this.Selection.StartPos < 0 )
this.Selection.StartPos = 0;
}
if ( this.Selection.EndPos >= Pos )
{
this.Selection.EndPos--;
if ( this.Selection.EndPos < 0 )
this.Selection.EndPos = 0;
}
if ( this.CurPos.ContentPos > Pos )
{
this.CurPos.ContentPos--;
if ( this.CurPos.ContentPos < 0 )
this.CurPos.ContentPos = 0;
}
// Обновляем позиции в NearestPos
var NearPosLen = this.NearPosArray.length;
......@@ -9558,7 +9588,7 @@ Paragraph.prototype =
{
var Parent = this.Parent;
if ( docpostype_Content === Parent.CurPos.Type && false === Parent.Selection.Use && this.Index === Parent.CurPos.ContentPos )
if ( docpostype_Content === Parent.CurPos.Type && false === Parent.Selection.Use && this.Index === Parent.CurPos.ContentPos && Parent.Content[this.Index] === this )
return this.Parent.Is_ThisElementCurrent();
return false;
......
......@@ -18935,6 +18935,8 @@ function CTableRow(Table, Cols, TableGrid)
if (typeof CollaborativeEditing !== "undefined")
CollaborativeEditing.Add_NewDC(this);
this.m_oContentChanges = new CContentChanges(); // список изменений(добавление/удаление элементов)
this.Index = 0;
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId.Add( this, this.Id );
......@@ -20327,6 +20329,8 @@ function CTableCell(Row, ColW)
CurPage : 0,
Y_VAlign_offset : [] // Сдвиг, который нужно сделать из-за VAlign (массив по страницам)
};
this.Index = 0;
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId.Add( this, this.Id );
......
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