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

Сделана обработка клавиш Up/Down в формулах.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52721 954022d7-b5bf-4e40-9824-e11837661b57
parent 546e7cb8
......@@ -6561,6 +6561,8 @@ Paragraph.prototype =
}
this.Set_ContentPos( StartPos, true, -1 );
this.CurPos.ContentPos2 = -1;
this.Selection_Remove();
// Пока сделаем для Count = 1
......@@ -6621,6 +6623,23 @@ Paragraph.prototype =
}
else
{
var CurPos2 = this.CurPos.ContentPos2;
var MathElement = this.Content[CurPos2];
if ( undefined !== MathElement && para_Math === MathElement.Type )
{
if ( true === MathElement.Cursor_MoveUp(false) )
{
if ( true === MathElement.Selection_IsUse() && false === MathElement.Selection_IsEmpty() )
this.Internal_SelectMath( CurPos2 );
return true;
}
else
{
this.CurPos.ContentPos2 = -1;
}
}
if ( 0 == CurLine )
{
// Возвращяем значение false, это означает, что надо перейти в
......@@ -6763,6 +6782,23 @@ Paragraph.prototype =
}
else
{
var CurPos2 = this.CurPos.ContentPos2;
var MathElement = this.Content[CurPos2];
if ( undefined !== MathElement && para_Math === MathElement.Type )
{
if ( true === MathElement.Cursor_MoveDown(false) )
{
if ( true === MathElement.Selection_IsUse() && false === MathElement.Selection_IsEmpty() )
this.Internal_SelectMath( CurPos2 );
return true;
}
else
{
this.CurPos.ContentPos2 = -1;
}
}
if ( this.Lines.length - 1 == CurLine )
{
// Возвращяем значение false, это означает, что надо перейти в
......@@ -8552,6 +8588,14 @@ Paragraph.prototype =
var Pos = TempPos.Pos;
var Line = TempPos.Line;
if ( undefined !== this.Content[TempPos.Pos2] && para_Math === this.Content[TempPos.Pos2].Type )
{
this.Content[TempPos.Pos2].Cursor_MoveAt( X, Y );
this.CurPos.ContentPos2 = TempPos.Pos2;
}
else
this.CurPos.ContentPos2 = -1;
if ( -1 != Pos )
{
this.Set_ContentPos( Pos, true, Line );
......
......@@ -7639,6 +7639,24 @@ ParaMath.prototype =
return this.Math.Cursor_MoveRight(bShiftKey, bCtrlKey);
},
Cursor_MoveUp : function(bShiftKey)
{
return this.Math.Cursor_MoveUp( bShiftKey );
},
Cursor_MoveDown : function(bShiftKey)
{
return this.Math.Cursor_MoveDown( bShiftKey );
},
Cursor_MoveAt : function(X, Y)
{
var MouseEvent = new CMouseEventHandler();
MouseEvent.Type = g_mouse_event_type_up;
this.Math.Selection_SetStart( X, Y, 0 );
this.Math.Selection_SetEnd( X, Y, 0, MouseEvent );
},
Cursor_MoveToStartPos : function()
{
},
......
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