Commit e979639f authored by Ilya Kirillov's avatar Ilya Kirillov

Implemented moving cursor left/right/home/end in footnotes.

parent 4c660ff1
...@@ -1873,7 +1873,7 @@ CDocumentContent.prototype.Cursor_MoveToStartPos = function(AddToSelect) ...@@ -1873,7 +1873,7 @@ CDocumentContent.prototype.Cursor_MoveToStartPos = function(AddToSelect)
this.Content[0].Cursor_MoveToStartPos(false); this.Content[0].Cursor_MoveToStartPos(false);
} }
}; };
CDocumentContent.prototype.Cursor_MoveToEndPos = function(AddToSelect) CDocumentContent.prototype.Cursor_MoveToEndPos = function(AddToSelect, StartSelectFromEnd)
{ {
if (true === AddToSelect) if (true === AddToSelect)
{ {
...@@ -1901,23 +1901,37 @@ CDocumentContent.prototype.Cursor_MoveToEndPos = function(AddToSelect) ...@@ -1901,23 +1901,37 @@ CDocumentContent.prototype.Cursor_MoveToEndPos = function(AddToSelect)
{ {
this.Content[Index].Select_All(1); this.Content[Index].Select_All(1);
} }
this.Content[StartPos].Cursor_MoveToEndPos(true); this.Content[StartPos].Cursor_MoveToEndPos(true);
} }
} }
else else
{ {
this.Selection_Remove(); if (true === StartSelectFromEnd)
{
this.Selection.Start = false;
this.Selection.Use = true;
this.Selection.StartPos = this.Content.length - 1;
this.Selection.EndPos = this.Content.length - 1;
this.Selection.Flag = selectionflag_Common;
this.CurPos.ContentPos = this.Content.length - 1;
this.Set_DocPosType(docpostype_Content);
this.Content[this.Content.length - 1].Cursor_MoveToEndPos(false, true);
}
else
{
this.Selection_Remove();
this.Selection.Start = false; this.Selection.Start = false;
this.Selection.Use = false; this.Selection.Use = false;
this.Selection.StartPos = 0; this.Selection.StartPos = 0;
this.Selection.EndPos = 0; this.Selection.EndPos = 0;
this.Selection.Flag = selectionflag_Common; this.Selection.Flag = selectionflag_Common;
this.CurPos.ContentPos = this.Content.length - 1; this.CurPos.ContentPos = this.Content.length - 1;
this.Set_DocPosType(docpostype_Content); this.Set_DocPosType(docpostype_Content);
this.Content[this.CurPos.ContentPos].Cursor_MoveToEndPos(false); this.Content[this.CurPos.ContentPos].Cursor_MoveToEndPos(false);
}
} }
}; };
CDocumentContent.prototype.Cursor_MoveUp_To_LastRow = function(X, Y, AddToSelect) CDocumentContent.prototype.Cursor_MoveUp_To_LastRow = function(X, Y, AddToSelect)
......
This diff is collapsed.
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