Commit 8bf55a24 authored by Oleg Korshul's avatar Oleg Korshul

CJK space (12288 code)

parent b7549732
...@@ -220,7 +220,7 @@ var c_oAscDynamicAutoFilter = { ...@@ -220,7 +220,7 @@ var c_oAscDynamicAutoFilter = {
var c_oAscTop10AutoFilter = { var c_oAscTop10AutoFilter = {
max: 1, max: 1,
min: 2 min: 2
} };
var c_oAscChangeFilterOptions = { var c_oAscChangeFilterOptions = {
filter: 1, filter: 1,
......
...@@ -32,29 +32,30 @@ ...@@ -32,29 +32,30 @@
"use strict"; "use strict";
(function(window, undefined){ (function(window, undefined)
{
// Import // Import
var AscBrowser = AscCommon.AscBrowser; var AscBrowser = AscCommon.AscBrowser;
var global_MatrixTransformer = AscCommon.global_MatrixTransformer; var global_MatrixTransformer = AscCommon.global_MatrixTransformer;
var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix; var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix;
// ��������� ��� ���� // ��������� ��� ����
var g_mouse_event_type_down = 0; var g_mouse_event_type_down = 0;
var g_mouse_event_type_move = 1; var g_mouse_event_type_move = 1;
var g_mouse_event_type_up = 2; var g_mouse_event_type_up = 2;
var g_mouse_event_type_wheel = 3; var g_mouse_event_type_wheel = 3;
var g_mouse_button_left = 0; var g_mouse_button_left = 0;
var g_mouse_button_center = 1; var g_mouse_button_center = 1;
var g_mouse_button_right = 2; var g_mouse_button_right = 2;
var MouseUpLock = { var MouseUpLock = {
MouseUpLockedSend: false MouseUpLockedSend : false
}; };
function CMouseEventHandler() function CMouseEventHandler()
{ {
this.X = 0; // ������� ������� X this.X = 0; // ������� ������� X
this.Y = 0; // ������� ������� Y this.Y = 0; // ������� ������� Y
...@@ -146,10 +147,10 @@ function CMouseEventHandler() ...@@ -146,10 +147,10 @@ function CMouseEventHandler()
} }
return false; return false;
}; };
} }
function CKeyboardEvent() function CKeyboardEvent()
{ {
this.AltKey = false; // ������ �� ������ alt this.AltKey = false; // ������ �� ������ alt
this.CtrlKey = false; // ������ �� ������ ctrl this.CtrlKey = false; // ������ �� ������ ctrl
this.ShiftKey = false; // ������ �� ������ shift this.ShiftKey = false; // ������ �� ������ shift
...@@ -159,13 +160,13 @@ function CKeyboardEvent() ...@@ -159,13 +160,13 @@ function CKeyboardEvent()
this.CharCode = 0; this.CharCode = 0;
this.KeyCode = 0; this.KeyCode = 0;
} }
var global_mouseEvent = new CMouseEventHandler(); var global_mouseEvent = new CMouseEventHandler();
var global_keyboardEvent = new CKeyboardEvent(); var global_keyboardEvent = new CKeyboardEvent();
function check_KeyboardEvent(e) function check_KeyboardEvent(e)
{ {
global_keyboardEvent.AltKey = e.altKey; global_keyboardEvent.AltKey = e.altKey;
if (e.metaKey !== undefined) if (e.metaKey !== undefined)
...@@ -189,9 +190,15 @@ function check_KeyboardEvent(e) ...@@ -189,9 +190,15 @@ function check_KeyboardEvent(e)
global_keyboardEvent.CharCode = e.charCode; global_keyboardEvent.CharCode = e.charCode;
global_keyboardEvent.KeyCode = e.keyCode; global_keyboardEvent.KeyCode = e.keyCode;
global_keyboardEvent.Which = e.which; global_keyboardEvent.Which = e.which;
}
function check_KeyboardEvent2(e) if ((global_keyboardEvent.KeyCode == 229) && (e.code == "space") || (e.code == "Space"))
{ {
global_keyboardEvent.KeyCode = 12288;
}
}
function check_KeyboardEvent2(e)
{
global_keyboardEvent.AltKey = e.altKey; global_keyboardEvent.AltKey = e.altKey;
if (e.metaKey !== undefined) if (e.metaKey !== undefined)
...@@ -205,20 +212,20 @@ function check_KeyboardEvent2(e) ...@@ -205,20 +212,20 @@ function check_KeyboardEvent2(e)
if (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey) if (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey)
global_keyboardEvent.CtrlKey = false; global_keyboardEvent.CtrlKey = false;
} }
function check_MouseMoveEvent(e) function check_MouseMoveEvent(e)
{ {
// ���� ���� ��������, �� ����� ������ �� ����. // ���� ���� ��������, �� ����� ������ �� ����.
if (e.IsLocked && !e.IsLockedEvent) if (e.IsLocked && !e.IsLockedEvent)
return; return;
if ( e.pageX || e.pageY ) if (e.pageX || e.pageY)
{ {
global_mouseEvent.X = e.pageX; global_mouseEvent.X = e.pageX;
global_mouseEvent.Y = e.pageY; global_mouseEvent.Y = e.pageY;
} }
else if ( e.clientX || e.clientY ) else if (e.clientX || e.clientY)
{ {
global_mouseEvent.X = e.clientX; global_mouseEvent.X = e.clientX;
global_mouseEvent.Y = e.clientY; global_mouseEvent.Y = e.clientY;
...@@ -243,10 +250,10 @@ function check_MouseMoveEvent(e) ...@@ -243,10 +250,10 @@ function check_MouseMoveEvent(e)
global_mouseEvent.LastClickTime = -1; global_mouseEvent.LastClickTime = -1;
global_mouseEvent.ClickCount = 0; global_mouseEvent.ClickCount = 0;
} }
} }
function CreateMouseUpEventObject(x, y) function CreateMouseUpEventObject(x, y)
{ {
var e = {}; var e = {};
e.PageX = x; e.PageX = x;
e.PageY = y; e.PageY = y;
...@@ -258,16 +265,16 @@ function CreateMouseUpEventObject(x, y) ...@@ -258,16 +265,16 @@ function CreateMouseUpEventObject(x, y)
e.srcElement = global_mouseEvent.Sender; e.srcElement = global_mouseEvent.Sender;
e.button = 0; e.button = 0;
return e; return e;
} }
function check_MouseUpEvent(e) function check_MouseUpEvent(e)
{ {
if ( e.pageX || e.pageY ) if (e.pageX || e.pageY)
{ {
global_mouseEvent.X = e.pageX; global_mouseEvent.X = e.pageX;
global_mouseEvent.Y = e.pageY; global_mouseEvent.Y = e.pageY;
} }
else if ( e.clientX || e.clientY ) else if (e.clientX || e.clientY)
{ {
global_mouseEvent.X = e.clientX; global_mouseEvent.X = e.clientX;
global_mouseEvent.Y = e.clientY; global_mouseEvent.Y = e.clientY;
...@@ -308,16 +315,16 @@ function check_MouseUpEvent(e) ...@@ -308,16 +315,16 @@ function check_MouseUpEvent(e)
global_mouseEvent.IsPressed = false; global_mouseEvent.IsPressed = false;
return lockedElement; return lockedElement;
} }
function check_MouseDownEvent(e, isClicks) function check_MouseDownEvent(e, isClicks)
{ {
if ( e.pageX || e.pageY ) if (e.pageX || e.pageY)
{ {
global_mouseEvent.X = e.pageX; global_mouseEvent.X = e.pageX;
global_mouseEvent.Y = e.pageY; global_mouseEvent.Y = e.pageY;
} }
else if ( e.clientX || e.clientY ) else if (e.clientX || e.clientY)
{ {
global_mouseEvent.X = e.clientX; global_mouseEvent.X = e.clientX;
global_mouseEvent.Y = e.clientY; global_mouseEvent.Y = e.clientY;
...@@ -345,14 +352,14 @@ function check_MouseDownEvent(e, isClicks) ...@@ -345,14 +352,14 @@ function check_MouseDownEvent(e, isClicks)
if (isClicks) if (isClicks)
{ {
var CurTime = new Date().getTime(); var CurTime = new Date().getTime();
if ( 0 == global_mouseEvent.ClickCount ) if (0 == global_mouseEvent.ClickCount)
{ {
global_mouseEvent.ClickCount = 1; global_mouseEvent.ClickCount = 1;
global_mouseEvent.LastClickTime = CurTime; global_mouseEvent.LastClickTime = CurTime;
} }
else else
{ {
if ( 500 > CurTime - global_mouseEvent.LastClickTime ) if (500 > CurTime - global_mouseEvent.LastClickTime)
{ {
global_mouseEvent.LastClickTime = CurTime; global_mouseEvent.LastClickTime = CurTime;
global_mouseEvent.ClickCount++; global_mouseEvent.ClickCount++;
...@@ -371,10 +378,10 @@ function check_MouseDownEvent(e, isClicks) ...@@ -371,10 +378,10 @@ function check_MouseDownEvent(e, isClicks)
} }
MouseUpLock.MouseUpLockedSend = false; MouseUpLock.MouseUpLockedSend = false;
} }
function check_MouseDownEvent2(x, y) function check_MouseDownEvent2(x, y)
{ {
global_mouseEvent.X = x; global_mouseEvent.X = x;
global_mouseEvent.Y = y; global_mouseEvent.Y = y;
...@@ -389,10 +396,10 @@ function check_MouseDownEvent2(x, y) ...@@ -389,10 +396,10 @@ function check_MouseDownEvent2(x, y)
global_mouseEvent.ClickCount = 1; global_mouseEvent.ClickCount = 1;
MouseUpLock.MouseUpLockedSend = false; MouseUpLock.MouseUpLockedSend = false;
} }
function global_OnMouseWheel(e) function global_OnMouseWheel(e)
{ {
global_mouseEvent.AltKey = e.altKey; global_mouseEvent.AltKey = e.altKey;
global_mouseEvent.ShiftKey = e.shiftKey; global_mouseEvent.ShiftKey = e.shiftKey;
global_mouseEvent.CtrlKey = e.ctrlKey || e.metaKey; global_mouseEvent.CtrlKey = e.ctrlKey || e.metaKey;
...@@ -408,12 +415,18 @@ function global_OnMouseWheel(e) ...@@ -408,12 +415,18 @@ function global_OnMouseWheel(e)
global_mouseEvent.LastClickTime = -1; global_mouseEvent.LastClickTime = -1;
global_mouseEvent.ClickCount = 0; global_mouseEvent.ClickCount = 0;
} }
function InitCaptureEvents() function InitCaptureEvents()
{ {
window.onmousemove = function(event){return Window_OnMouseMove(event)}; window.onmousemove = function(event)
window.onmouseup = function(event){return Window_OnMouseUp(event)}; {
return Window_OnMouseMove(event)
};
window.onmouseup = function(event)
{
return Window_OnMouseUp(event)
};
/* /*
var parent = window; var parent = window;
while (true) while (true)
...@@ -430,10 +443,10 @@ function InitCaptureEvents() ...@@ -430,10 +443,10 @@ function InitCaptureEvents()
parent = parent.parent; parent = parent.parent;
} }
*/ */
} }
function Window_OnMouseMove(e) function Window_OnMouseMove(e)
{ {
if (!global_mouseEvent.IsLocked) if (!global_mouseEvent.IsLocked)
return; return;
...@@ -444,9 +457,10 @@ function Window_OnMouseMove(e) ...@@ -444,9 +457,10 @@ function Window_OnMouseMove(e)
global_mouseEvent.Sender.onmousemove(e); global_mouseEvent.Sender.onmousemove(e);
global_mouseEvent.IsLockedEvent = false; global_mouseEvent.IsLockedEvent = false;
} }
} }
function Window_OnMouseUp(e)
{ function Window_OnMouseUp(e)
{
if (false === MouseUpLock.MouseUpLockedSend) if (false === MouseUpLock.MouseUpLockedSend)
{ {
MouseUpLock.MouseUpLockedSend = true; MouseUpLock.MouseUpLockedSend = true;
...@@ -458,12 +472,12 @@ function Window_OnMouseUp(e) ...@@ -458,12 +472,12 @@ function Window_OnMouseUp(e)
} }
} }
} }
} }
InitCaptureEvents(); InitCaptureEvents();
function button_eventHandlers(disable_pos,norm_pos,over_pos,down_pos,control,click_func_delegate) function button_eventHandlers(disable_pos, norm_pos, over_pos, down_pos, control, click_func_delegate)
{ {
this.state_normal = norm_pos; this.state_normal = norm_pos;
this.state_over = over_pos; this.state_over = over_pos;
this.state_down = down_pos; this.state_down = down_pos;
...@@ -562,7 +576,8 @@ function button_eventHandlers(disable_pos,norm_pos,over_pos,down_pos,control,cli ...@@ -562,7 +576,8 @@ function button_eventHandlers(disable_pos,norm_pos,over_pos,down_pos,control,cli
} }
// теперь touch // теперь touch
this.Control.HtmlElement.ontouchstart = function(e){ this.Control.HtmlElement.ontouchstart = function(e)
{
oThis.Control.HtmlElement.onmousedown(e.touches[0]); oThis.Control.HtmlElement.onmousedown(e.touches[0]);
return false; return false;
} }
...@@ -586,10 +601,10 @@ function button_eventHandlers(disable_pos,norm_pos,over_pos,down_pos,control,cli ...@@ -586,10 +601,10 @@ function button_eventHandlers(disable_pos,norm_pos,over_pos,down_pos,control,cli
global_mouseEvent.buttonObject = null; global_mouseEvent.buttonObject = null;
return false; return false;
} }
} }
function CTouchManager() function CTouchManager()
{ {
this.touches = []; this.touches = [];
this.ScrollY = null; this.ScrollY = null;
this.ScrollH = null; this.ScrollH = null;
...@@ -612,7 +627,7 @@ function CTouchManager() ...@@ -612,7 +627,7 @@ function CTouchManager()
{ {
this.touches.push({x : _e.pageX, y : _e.pageY}); this.touches.push({x : _e.pageX, y : _e.pageY});
} }
else if ( e.clientX || e.clientY ) else if (e.clientX || e.clientY)
{ {
this.touches.push({x : _e.clientX, y : _e.clientY}); this.touches.push({x : _e.clientX, y : _e.clientY});
} }
...@@ -661,7 +676,7 @@ function CTouchManager() ...@@ -661,7 +676,7 @@ function CTouchManager()
_maxY = _y; _maxY = _y;
} }
} }
else if ( e.clientX || e.clientY ) else if (e.clientX || e.clientY)
{ {
var _x = _e.clientX - this.touches[i].x; var _x = _e.clientX - this.touches[i].x;
var _y = _e.clientY - this.touches[i].y; var _y = _e.clientY - this.touches[i].y;
...@@ -713,10 +728,10 @@ function CTouchManager() ...@@ -713,10 +728,10 @@ function CTouchManager()
this.touches.splice(0, this.touches.length); this.touches.splice(0, this.touches.length);
return true; return true;
} }
} }
var MobileTouchMode = var MobileTouchMode =
{ {
None : 0, None : 0,
Scroll : 1, Scroll : 1,
Zoom : 2, Zoom : 2,
...@@ -726,10 +741,10 @@ var MobileTouchMode = ...@@ -726,10 +741,10 @@ var MobileTouchMode =
Cursor : 6, Cursor : 6,
TableMove : 7, TableMove : 7,
TableRuler : 8 TableRuler : 8
}; };
function CMobileTouchManager() function CMobileTouchManager()
{ {
this.AnimateScroll = false; this.AnimateScroll = false;
this.AnimateZoom = false; this.AnimateZoom = false;
...@@ -792,9 +807,12 @@ function CMobileTouchManager() ...@@ -792,9 +807,12 @@ function CMobileTouchManager()
this.LogicDocument = ctrl.m_oLogicDocument; this.LogicDocument = ctrl.m_oLogicDocument;
this.DrawingDocument = ctrl.m_oDrawingDocument; this.DrawingDocument = ctrl.m_oDrawingDocument;
this.iScroll = new AscCommon.CTouchScroll(ctrl, { onAnimationEnd : function(param) { this.iScroll = new AscCommon.CTouchScroll(ctrl, {
onAnimationEnd : function(param)
{
param.api.MobileTouchManager.OnScrollAnimationEnd(); param.api.MobileTouchManager.OnScrollAnimationEnd();
} }); }
});
LoadMobileImages(); LoadMobileImages();
} }
...@@ -1241,7 +1259,7 @@ function CMobileTouchManager() ...@@ -1241,7 +1259,7 @@ function CMobileTouchManager()
var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX; var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX;
var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY; var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY;
this.ZoomDistance = Math.sqrt((_x1 - _x2)*(_x1 - _x2) + (_y1 - _y2)*(_y1 - _y2)); this.ZoomDistance = Math.sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
this.ZoomValue = this.HtmlPage.m_nZoomValue; this.ZoomValue = this.HtmlPage.m_nZoomValue;
break; break;
...@@ -1373,7 +1391,7 @@ function CMobileTouchManager() ...@@ -1373,7 +1391,7 @@ function CMobileTouchManager()
var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX; var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX;
var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY; var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY;
var zoomCurrentDist = Math.sqrt((_x1 - _x2)*(_x1 - _x2) + (_y1 - _y2)*(_y1 - _y2)); var zoomCurrentDist = Math.sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
if (zoomCurrentDist == 0) if (zoomCurrentDist == 0)
zoomCurrentDist = 1; zoomCurrentDist = 1;
...@@ -1705,7 +1723,7 @@ function CMobileTouchManager() ...@@ -1705,7 +1723,7 @@ function CMobileTouchManager()
var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX; var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX;
var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY; var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY;
this.ZoomDistance = Math.sqrt((_x1 - _x2)*(_x1 - _x2) + (_y1 - _y2)*(_y1 - _y2)); this.ZoomDistance = Math.sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
this.ZoomValue = this.HtmlPage.m_nZoomValue; this.ZoomValue = this.HtmlPage.m_nZoomValue;
break; break;
...@@ -1754,7 +1772,7 @@ function CMobileTouchManager() ...@@ -1754,7 +1772,7 @@ function CMobileTouchManager()
var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX; var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX;
var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY; var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY;
var zoomCurrentDist = Math.sqrt((_x1 - _x2)*(_x1 - _x2) + (_y1 - _y2)*(_y1 - _y2)); var zoomCurrentDist = Math.sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
if (zoomCurrentDist == 0) if (zoomCurrentDist == 0)
zoomCurrentDist = 1; zoomCurrentDist = 1;
...@@ -1916,7 +1934,10 @@ function CMobileTouchManager() ...@@ -1916,7 +1934,10 @@ function CMobileTouchManager()
clearTimeout(this.ShowMenuTimerId); clearTimeout(this.ShowMenuTimerId);
} }
var that = this; var that = this;
that.ShowMenuTimerId = setTimeout(function(){ that.HtmlPage.m_oApi.asc_fireCallback("asc_onShowPopMenu", x, y); }, 500); that.ShowMenuTimerId = setTimeout(function()
{
that.HtmlPage.m_oApi.asc_fireCallback("asc_onShowPopMenu", x, y);
}, 500);
} }
this.OnScrollAnimationEnd = function() this.OnScrollAnimationEnd = function()
...@@ -2155,7 +2176,7 @@ function CMobileTouchManager() ...@@ -2155,7 +2176,7 @@ function CMobileTouchManager()
var ex11 = _matrix.TransformPointX(0, 1); var ex11 = _matrix.TransformPointX(0, 1);
var ey11 = _matrix.TransformPointY(0, 1); var ey11 = _matrix.TransformPointY(0, 1);
var _len = Math.sqrt((ex11 - ex01)*(ex11 - ex01) + (ey11 - ey01)*(ey11 - ey01)); var _len = Math.sqrt((ex11 - ex01) * (ex11 - ex01) + (ey11 - ey01) * (ey11 - ey01));
if (_len == 0) if (_len == 0)
_len = 0.01; _len = 0.01;
...@@ -2219,7 +2240,7 @@ function CMobileTouchManager() ...@@ -2219,7 +2240,7 @@ function CMobileTouchManager()
if (!_table_outline_dr.TableMatrix || global_MatrixTransformer.IsIdentity(_table_outline_dr.TableMatrix)) if (!_table_outline_dr.TableMatrix || global_MatrixTransformer.IsIdentity(_table_outline_dr.TableMatrix))
{ {
this.TableMovePoint = { X : _tableOutline.X, Y : _tableOutline.Y }; this.TableMovePoint = {X : _tableOutline.X, Y : _tableOutline.Y};
var pos1 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X, _tableOutline.Y, _tableOutline.PageNum); var pos1 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X, _tableOutline.Y, _tableOutline.PageNum);
var pos2 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X + _tableW, _tableOutline.Y, _tableOutline.PageNum); var pos2 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X + _tableW, _tableOutline.Y, _tableOutline.PageNum);
...@@ -2269,7 +2290,7 @@ function CMobileTouchManager() ...@@ -2269,7 +2290,7 @@ function CMobileTouchManager()
{ {
var _newPos = (i != _count) ? _table_markup.Rows[i].Y : _oldY; var _newPos = (i != _count) ? _table_markup.Rows[i].Y : _oldY;
var _p = { Y : _oldY, H : (_newPos - _oldY) }; var _p = {Y : _oldY, H : (_newPos - _oldY)};
var _r_x = _x; var _r_x = _x;
var _r_y = ((yDst + dKoef * _oldY) >> 0) + 0.5; var _r_y = ((yDst + dKoef * _oldY) >> 0) + 0.5;
...@@ -2296,7 +2317,7 @@ function CMobileTouchManager() ...@@ -2296,7 +2317,7 @@ function CMobileTouchManager()
overlay.AddRect(__x, TableMoveRect_y, __r - __x, _rectWidth); overlay.AddRect(__x, TableMoveRect_y, __r - __x, _rectWidth);
this.TableHorRulerPoints[_rectIndex++] = { X : _x, W : _r - _x, C : _col }; this.TableHorRulerPoints[_rectIndex++] = {X : _x, W : _r - _x, C : _col};
} }
ctx.fill(); ctx.fill();
...@@ -2332,9 +2353,9 @@ function CMobileTouchManager() ...@@ -2332,9 +2353,9 @@ function CMobileTouchManager()
_coord_transform.ty = yDst; _coord_transform.ty = yDst;
_coord_transform.Multiply(_table_outline_dr.TableMatrix, AscCommon.MATRIX_ORDER_PREPEND); _coord_transform.Multiply(_table_outline_dr.TableMatrix, AscCommon.MATRIX_ORDER_PREPEND);
ctx.setTransform(_coord_transform.sx,_coord_transform.shy,_coord_transform.shx,_coord_transform.sy,_coord_transform.tx,_coord_transform.ty); ctx.setTransform(_coord_transform.sx, _coord_transform.shy, _coord_transform.shx, _coord_transform.sy, _coord_transform.tx, _coord_transform.ty);
this.TableMovePoint = { X : _tableOutline.X, Y : _tableOutline.Y }; this.TableMovePoint = {X : _tableOutline.X, Y : _tableOutline.Y};
ctx.beginPath(); ctx.beginPath();
...@@ -2377,7 +2398,7 @@ function CMobileTouchManager() ...@@ -2377,7 +2398,7 @@ function CMobileTouchManager()
{ {
var _newPos = (i != _count) ? (_table_markup.Rows[i].Y - _table_outline_dr.TableMatrix.ty) : _oldY; var _newPos = (i != _count) ? (_table_markup.Rows[i].Y - _table_outline_dr.TableMatrix.ty) : _oldY;
var _p = { Y : _oldY, H : (_newPos - _oldY) }; var _p = {Y : _oldY, H : (_newPos - _oldY)};
ctx.rect(_xx, _p.Y, _rectW, _p.H); ctx.rect(_xx, _p.Y, _rectW, _p.H);
...@@ -2401,7 +2422,7 @@ function CMobileTouchManager() ...@@ -2401,7 +2422,7 @@ function CMobileTouchManager()
ctx.rect(_x, this.TableMovePoint.Y - _offset, _r - _x, _rectW); ctx.rect(_x, this.TableMovePoint.Y - _offset, _r - _x, _rectW);
this.TableHorRulerPoints[_rectIndex++] = { X : _x, W : _r - _x, C : _col }; this.TableHorRulerPoints[_rectIndex++] = {X : _x, W : _r - _x, C : _col};
} }
ctx.fill(); ctx.fill();
...@@ -2419,7 +2440,7 @@ function CMobileTouchManager() ...@@ -2419,7 +2440,7 @@ function CMobileTouchManager()
} }
else else
{ {
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue,_table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix); var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue, _table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.HorLine(_pos.Y, true); overlay.HorLine(_pos.Y, true);
} }
} }
...@@ -2469,7 +2490,7 @@ function CMobileTouchManager() ...@@ -2469,7 +2490,7 @@ function CMobileTouchManager()
if (!_table_outline_dr.TableMatrix || global_MatrixTransformer.IsIdentity(_table_outline_dr.TableMatrix)) if (!_table_outline_dr.TableMatrix || global_MatrixTransformer.IsIdentity(_table_outline_dr.TableMatrix))
{ {
this.TableMovePoint = { X : _tableOutline.X, Y : _tableOutline.Y }; this.TableMovePoint = {X : _tableOutline.X, Y : _tableOutline.Y};
var pos1 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X, _tableOutline.Y, _tableOutline.PageNum); var pos1 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X, _tableOutline.Y, _tableOutline.PageNum);
var pos2 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X + _tableW, _tableOutline.Y, _tableOutline.PageNum); var pos2 = this.DrawingDocument.ConvertCoordsToCursorWR(_tableOutline.X + _tableW, _tableOutline.Y, _tableOutline.PageNum);
...@@ -2539,7 +2560,7 @@ function CMobileTouchManager() ...@@ -2539,7 +2560,7 @@ function CMobileTouchManager()
{ {
var _newPos = (i != _count) ? _table_markup.Rows[i].Y : _oldY; var _newPos = (i != _count) ? _table_markup.Rows[i].Y : _oldY;
var _p = { Y : _oldY, H : (_newPos - _oldY) }; var _p = {Y : _oldY, H : (_newPos - _oldY)};
var _r_x = _x; var _r_x = _x;
var _r_y = ((yDst + dKoef * _oldY) >> 0) + 0.5; var _r_y = ((yDst + dKoef * _oldY) >> 0) + 0.5;
...@@ -2574,7 +2595,7 @@ function CMobileTouchManager() ...@@ -2574,7 +2595,7 @@ function CMobileTouchManager()
overlay.CheckRect(xImage, yImage, ___w, ___h); overlay.CheckRect(xImage, yImage, ___w, ___h);
ctx.drawImage(window.g_table_track_diamond, xImage, yImage); ctx.drawImage(window.g_table_track_diamond, xImage, yImage);
this.TableHorRulerPoints[_rectIndex++] = { X : _x, W : _r - _x, C : _col }; this.TableHorRulerPoints[_rectIndex++] = {X : _x, W : _r - _x, C : _col};
} }
ctx.beginPath(); ctx.beginPath();
...@@ -2607,9 +2628,9 @@ function CMobileTouchManager() ...@@ -2607,9 +2628,9 @@ function CMobileTouchManager()
_coord_transform.ty = yDst; _coord_transform.ty = yDst;
_coord_transform.Multiply(_table_outline_dr.TableMatrix, AscCommon.MATRIX_ORDER_PREPEND); _coord_transform.Multiply(_table_outline_dr.TableMatrix, AscCommon.MATRIX_ORDER_PREPEND);
ctx.setTransform(_coord_transform.sx,_coord_transform.shy,_coord_transform.shx,_coord_transform.sy,_coord_transform.tx,_coord_transform.ty); ctx.setTransform(_coord_transform.sx, _coord_transform.shy, _coord_transform.shx, _coord_transform.sy, _coord_transform.tx, _coord_transform.ty);
this.TableMovePoint = { X : _tableOutline.X, Y : _tableOutline.Y }; this.TableMovePoint = {X : _tableOutline.X, Y : _tableOutline.Y};
ctx.beginPath(); ctx.beginPath();
...@@ -2669,7 +2690,7 @@ function CMobileTouchManager() ...@@ -2669,7 +2690,7 @@ function CMobileTouchManager()
{ {
var _newPos = (i != _count) ? (_table_markup.Rows[i].Y - _table_outline_dr.TableMatrix.ty) : _oldY; var _newPos = (i != _count) ? (_table_markup.Rows[i].Y - _table_outline_dr.TableMatrix.ty) : _oldY;
var _p = { Y : _oldY, H : (_newPos - _oldY) }; var _p = {Y : _oldY, H : (_newPos - _oldY)};
var ___y = (_p.Y + (_p.H / 2) - ((___h / dKoef) / 2)); var ___y = (_p.Y + (_p.H / 2) - ((___h / dKoef) / 2));
ctx.drawImage(window.g_table_track_diamond, _xx, ___y, ___w / dKoef, ___h / dKoef); ctx.drawImage(window.g_table_track_diamond, _xx, ___y, ___w / dKoef, ___h / dKoef);
...@@ -2695,7 +2716,7 @@ function CMobileTouchManager() ...@@ -2695,7 +2716,7 @@ function CMobileTouchManager()
var ___x = (_col - ((___w / dKoef) / 2)); var ___x = (_col - ((___w / dKoef) / 2));
ctx.drawImage(window.g_table_track_diamond, ___x, (this.TableMovePoint.Y - _offset), ___w / dKoef, ___h / dKoef); ctx.drawImage(window.g_table_track_diamond, ___x, (this.TableMovePoint.Y - _offset), ___w / dKoef, ___h / dKoef);
this.TableHorRulerPoints[_rectIndex++] = { X : _x, W : _r - _x, C : _col }; this.TableHorRulerPoints[_rectIndex++] = {X : _x, W : _r - _x, C : _col};
} }
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.setTransform(1, 0, 0, 1, 0, 0);
...@@ -2710,16 +2731,16 @@ function CMobileTouchManager() ...@@ -2710,16 +2731,16 @@ function CMobileTouchManager()
} }
else else
{ {
var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue,_table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix); var _pos = this.DrawingDocument.ConvertCoordsToCursorWR(0, this.TableCurrentMoveValue, _table_outline_dr.CurrentPageIndex, _table_outline_dr.TableMatrix);
overlay.HorLine(_pos.Y, true); overlay.HorLine(_pos.Y, true);
} }
} }
} }
} }
} }
function CReaderTouchManager() function CReaderTouchManager()
{ {
this.HtmlPage = null; this.HtmlPage = null;
this.iScroll = null; this.iScroll = null;
...@@ -2787,14 +2808,15 @@ function CReaderTouchManager() ...@@ -2787,14 +2808,15 @@ function CReaderTouchManager()
if (this.iScroll != null) if (this.iScroll != null)
this.iScroll.destroy(); this.iScroll.destroy();
} }
} }
function LoadMobileImages() function LoadMobileImages()
{ {
window.g_table_track_mobile_move = new Image(); window.g_table_track_mobile_move = new Image();
window.g_table_track_mobile_move; window.g_table_track_mobile_move;
window.g_table_track_mobile_move.asc_complete = false; window.g_table_track_mobile_move.asc_complete = false;
window.g_table_track_mobile_move.onload = function(){ window.g_table_track_mobile_move.onload = function()
{
window.g_table_track_mobile_move.asc_complete = true; window.g_table_track_mobile_move.asc_complete = true;
}; };
window.g_table_track_mobile_move.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNqMlc9rWkEQx8ffGqMJBJpSUEIISInxpCfT1krioQQ85xISEKGBkGuhpxwEL4GAoOBJ8V9IxJCQ1l4SkFKxQvEfKEXQ0Nb4IxLtfBefvMeriQPj7ps377Mzu7OjZjgckoYlGo2+tFqtcZ1OFyAiG00nfx8eHj7f3d19SKfTP5g11LBRs7u761lYWPiytbVl9/l8ZDKZpqL1ej0qlUp0enr6p9FovM5kMhU92w02my0OmN/vJ0TcbreJVxZzCH9ARqORQqGQCurxeAC2n52dxfkxDOCMXq9/5fV6aTAYEIc/BkHYkWKx2Ni2ubn5X+j5+fkbweIf5GdFmoAhMkny+TzF43GyWCzi+ejoSIA3NjYUQA4IA5xMmGnhBO33+4rowuEwbW9vKz7Gdtzf36uiHH2n1eJQkCoE0WFeKBTE2O12qdlsKhQ2vLu6uhKjXMHSyuhivLi4oEQiQVLUk/T4+JiKxaLCJtKXQNDLy0tKJpM0NzcnrThR4HNyciLm6+vraiAEB8P1KE9hoqCMzGYzGQwG4asASoZAIEDz8/OUSqWeBGLxg4MDWl1dHe+rKkKUDWpqf3//SeDh4SG5XC5x6nKGYg+lW+J2u6nT6TwKBEzuo0pZPiJSyPX1NWWz2bFdy1UWiUQIt0rykUSe8pDrr837MCMvakgwGCSHw0G5XE487+3t0dLSkip6FDozumABOODVvt3c3PiXl5cVjq1Wi1ZWVmhnZ0dcL6fTqYoMUqlUYP8Klg7dhlNp3N7evuM7a0DZcE9UrL64uEh2u318APJ35XIZl6HN0I/1er2GfmhkfcGb/JYP4/3s7OwaL2Ceph/yvnU5i+/VajVVq9U+semnaLCjTvGM9TkuAaKesmP3WX+z/m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z/mKts3Y00l/ACDIzamfa0UKPCU4QR9tDEwIcfwH/BBgAl4G4NBf6Z6AAAAAASUVORK5CYII=";
...@@ -2802,7 +2824,8 @@ function LoadMobileImages() ...@@ -2802,7 +2824,8 @@ function LoadMobileImages()
window.g_table_track_round = new Image(); window.g_table_track_round = new Image();
window.g_table_track_round; window.g_table_track_round;
window.g_table_track_round.asc_complete = false; window.g_table_track_round.asc_complete = false;
window.g_table_track_round.onload = function(){ window.g_table_track_round.onload = function()
{
window.g_table_track_round.asc_complete = true; window.g_table_track_round.asc_complete = true;
}; };
window.g_table_track_round.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNp8k01oE0EUx9/uZjdxtQlpU9Acc2mL2lMOKhgQlCAU8ZSDeBFMoWc95ODJY80ht7YxF1MUIQcrfvQQsIdSESQBay2JtClVaIsbljZfJpPdGd/EiUYTfeTHbGbn/995b95IjDEYEMeQKHIVGUX2kSVkESG9C6W/DSild4ktPci8I7BaaINZozDqluHyGRWuBZ2gSHRGluX5gQaWZd3ZO5Ti0YUKfDH7tzV+SoL5qBt8J1hUUZQUn5O7L3O5nIfYSvz2XHmgmEdhn8FMsoyfVR4mk0mVzzk628CoVCrTmbdHsGtYIKsa/Cs+fSWwnK9BJBK5gbJ0dweKqqrh1Y0Kmsnw/5BgZf0INE2b4hk4xCwf/XvfjoC0XCBT2lnYHwwoqcGBQbHYHj/XdQ3URqNh+HQy0arWQNY86K3066kNdusQRvQhqNfr5V4DqVgsrl2a9IVerq2D7GpinVw425MOo8CsBtCmCeHgecjn8ys8hc4xYjGGAoHA2Gbh8/vQdAY2dr+DpLlRr/GKo9jGXxMYqcLFyWFYTlwHl8t5lhCy0/1Eu1Qqma9ePE8+m52C034bWuYWNM1twRb+34YLYxo8vh+GdPrRLIqrvHVANJJDtOy5VCq12LZs9uT1B3Y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uZHipxEvAjvqhZiikt1IJ6bqKV/3AVh4kR0xC1GpZMrQB2piZFw8cDbKNKRRV0c4tkWcCOsxG/RDwEGALPnFhI3WYx7AAAAAElFTkSuQmCC";
...@@ -2810,12 +2833,13 @@ function LoadMobileImages() ...@@ -2810,12 +2833,13 @@ function LoadMobileImages()
window.g_table_track_diamond = new Image(); window.g_table_track_diamond = new Image();
window.g_table_track_diamond; window.g_table_track_diamond;
window.g_table_track_diamond.asc_complete = false; window.g_table_track_diamond.asc_complete = false;
window.g_table_track_diamond.onload = function(){ window.g_table_track_diamond.onload = function()
{
window.g_table_track_diamond.asc_complete = true; window.g_table_track_diamond.asc_complete = true;
}; };
window.g_table_track_diamond.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmdJREFUeNqck0toE1EUQO9MakqbKi5CqyIIIm0hDUTIQuhGKtSqIEQRXIjZda92Iemu6iJGdKFWhCI2JJhAVi2ouJBuulKXXWgM2OYzNb8Z8898cr2vHT9pZhLxwWF493OYefMuICL04ArxXn92re2a1DTtliBp6F0s4WZeQ9r7/kumKMqcIGo4fU/E8ZtFPL0g4mZORYrPm/XwYLBUVZ3LV7jA9SdF2CrgTmxbQvA+lSAjcXcpP2/Ux5uLREiKlrbcdokHL8XNhPy/in4LyxZTIW/0aWaiXkKOHZwgCMe4geFv1x6lIClZgbNYoddCTYaRoSaEbhyFQZDG7Hb7F56jlclk+gBbIFey0CwLoNR/gCrXQVWanVCc5VmdXM5SmwbpdHof8+x8ptvtzubTnx9EfU440l+AppQEpSaB2qiC2qz/gfYszvJ2Sw4iPgdU84nHLpcr1XZmTqdz+cP6u1exO5Nw2FaCBjU0q0WQ62WQScKebN+QUmDvlyC2MAkbn9ZiDodj6ZeDnTSn0xeJRLbcJycO3p6dGVtd24CCWAatBdDSVHqzCqjVHIzYarByfxo+rr997fF4FqkvTZTY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FOzQfyaLHYVGQ76HuFMIBBYisfjCb/f/4L2581EDE4XtC26Mkw4SAwTh3R5hV1+IkvUqE/t6DOS/SUc0KVsJBSiSjSMRF1lupDX7yITa0SL6ltm9T8FGADChEYX8dVTaAAAAABJRU5ErkJggg==";
} }
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
......
...@@ -6790,6 +6790,22 @@ CDocument.prototype.OnKeyDown = function(e) ...@@ -6790,6 +6790,22 @@ CDocument.prototype.OnKeyDown = function(e)
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
bRetValue = keydownresult_PreventAll; bRetValue = keydownresult_PreventAll;
} }
else if (e.KeyCode == 12288 && false === editor.isViewMode) // Space
{
if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content, null, true))
{
this.Create_NewHistoryPoint(AscDFH.historydescription_Document_SpaceButton);
this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow();
this.CheckLanguageOnTextAdd = true;
this.Paragraph_Add(new ParaSpace());
this.CheckLanguageOnTextAdd = false;
}
bRetValue = keydownresult_PreventAll;
}
// Если был пересчет, значит были изменения, а вместе с ними пересылается и новая позиция курсора // Если был пересчет, значит были изменения, а вместе с ними пересылается и новая позиция курсора
if (bRetValue & keydownresult_PreventKeyPress && OldRecalcId === this.RecalcId) if (bRetValue & keydownresult_PreventKeyPress && OldRecalcId === this.RecalcId)
...@@ -11086,8 +11102,16 @@ CDocument.prototype.Add_CompositeText = function(nCharCode) ...@@ -11086,8 +11102,16 @@ CDocument.prototype.Add_CompositeText = function(nCharCode)
var oRun = this.CompositeInput.Run; var oRun = this.CompositeInput.Run;
var nPos = this.CompositeInput.Pos + this.CompositeInput.Length; var nPos = this.CompositeInput.Pos + this.CompositeInput.Length;
var oChar = new ParaText(); var oChar;
if (32 == nCharCode || 12288 == nCharCode)
{
oChar = new ParaSpace();
}
else
{
oChar = new ParaText();
oChar.Set_CharCode(nCharCode); oChar.Set_CharCode(nCharCode);
}
oRun.Add_ToContent(nPos, oChar, true); oRun.Add_ToContent(nPos, oChar, true);
this.CompositeInput.Length++; this.CompositeInput.Length++;
......
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