Commit 117f2eda authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54561 954022d7-b5bf-4e40-9824-e11837661b57
parent 2490e925
......@@ -591,7 +591,7 @@ CDrawingDocument.prototype =
this.EndUpdateOverlay();
},
OnKeyDown : function()
OnKeyDown : function(e)
{
check_KeyboardEvent(e);
......@@ -606,14 +606,14 @@ CDrawingDocument.prototype =
this.EndUpdateOverlay();
},
OnKeyUp : function()
OnKeyUp : function(e)
{
global_keyboardEvent.AltKey = false;
global_keyboardEvent.CtrlKey = false;
global_keyboardEvent.ShiftKey = false;
},
OnKeyPress : function()
OnKeyPress : function(e)
{
if (false === this.bIsUseKeyPress)
return;
......@@ -628,4 +628,70 @@ CDrawingDocument.prototype =
this.EndUpdateOverlay();
return retValue;
}
};
\ No newline at end of file
};
function check_KeyboardEvent(e)
{
global_keyboardEvent.AltKey = ((e.Flags & 0x01) == 0x01);
global_keyboardEvent.CtrlKey = ((e.Flags & 0x02) == 0x02);
global_keyboardEvent.ShiftKey = ((e.Flags & 0x04) == 0x04);
global_keyboardEvent.Sender = null;
global_keyboardEvent.CharCode = e.CharCode;
global_keyboardEvent.KeyCode = e.KeyCode;
global_keyboardEvent.Which = null;
}
function check_MouseDownEvent(e, isClicks)
{
global_mouseEvent.X = e.X;
global_mouseEvent.Y = e.Y;
global_mouseEvent.AltKey = ((e.Flags & 0x01) == 0x01);
global_mouseEvent.CtrlKey = ((e.Flags & 0x02) == 0x02);
global_mouseEvent.ShiftKey = ((e.Flags & 0x04) == 0x04);
global_mouseEvent.Type = g_mouse_event_type_down;
global_mouseEvent.Button = e.Button;
global_mouseEvent.Sender = null;
if (isClicks)
{
global_mouseEvent.ClickCount = e.ClickCount;
}
else
{
global_mouseEvent.ClickCount = 1;
}
}
function check_MouseMoveEvent(e)
{
global_mouseEvent.X = e.X;
global_mouseEvent.Y = e.Y;
global_mouseEvent.AltKey = ((e.Flags & 0x01) == 0x01);
global_mouseEvent.CtrlKey = ((e.Flags & 0x02) == 0x02);
global_mouseEvent.ShiftKey = ((e.Flags & 0x04) == 0x04);
global_mouseEvent.Type = g_mouse_event_type_move;
global_mouseEvent.Button = e.Button;
}
function check_MouseUpEvent(e)
{
global_mouseEvent.X = e.X;
global_mouseEvent.Y = e.Y;
global_mouseEvent.AltKey = ((e.Flags & 0x01) == 0x01);
global_mouseEvent.CtrlKey = ((e.Flags & 0x02) == 0x02);
global_mouseEvent.ShiftKey = ((e.Flags & 0x04) == 0x04);
global_mouseEvent.Type = g_mouse_event_type_up;
global_mouseEvent.Button = e.Button;
global_mouseEvent.Sender = null;
}
......@@ -400,3 +400,8 @@ window.native.Call_OnKeyUp = function(e)
{
_api.WordControl.m_oDrawingDocument.OnKeyUp(e);
};
window.native.Call_CalculateResume = function()
{
Document_Recalculate_Page();
}
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