Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
592c1687
Commit
592c1687
authored
Dec 07, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
24d5c604
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
75 deletions
+20
-75
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+6
-3
word/Drawing/mobileTouchManager.js
word/Drawing/mobileTouchManager.js
+14
-72
No files found.
common/Scrolls/mobileTouchManagerBase.js
View file @
592c1687
...
@@ -1523,7 +1523,7 @@
...
@@ -1523,7 +1523,7 @@
};
};
/* simple click */
/* simple click */
CMobileTouchManagerBase
.
prototype
.
MoveCursorToPoint
=
function
(
e
)
CMobileTouchManagerBase
.
prototype
.
MoveCursorToPoint
=
function
(
isHalfHeight
)
{
{
AscCommon
.
check_MouseMoveEvent
(
e
);
AscCommon
.
check_MouseMoveEvent
(
e
);
var
pos
=
this
.
delegate
.
ConvertCoordsFromCursor
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
var
pos
=
this
.
delegate
.
ConvertCoordsFromCursor
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
...
@@ -1534,8 +1534,11 @@
...
@@ -1534,8 +1534,11 @@
var
nearPos
=
this
.
delegate
.
Logic_GetNearestPos
(
pos
.
Page
,
pos
.
X
,
pos
.
Y
);
var
nearPos
=
this
.
delegate
.
Logic_GetNearestPos
(
pos
.
Page
,
pos
.
X
,
pos
.
Y
);
this
.
delegate
.
DrawingDocument
.
NeedScrollToTargetFlag
=
true
;
this
.
delegate
.
DrawingDocument
.
NeedScrollToTargetFlag
=
true
;
this
.
delegate
.
Logic_OnMouseDown
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
,
pos
.
Page
);
var
y
=
nearPos
.
Y
;
this
.
delegate
.
Logic_OnMouseUp
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
,
pos
.
Page
);
if
(
isHalfHeight
)
y
+=
nearPos
.
Height
/
2
;
this
.
delegate
.
Logic_OnMouseDown
(
global_mouseEvent
,
nearPos
.
X
,
y
,
pos
.
Page
);
this
.
delegate
.
Logic_OnMouseUp
(
global_mouseEvent
,
nearPos
.
X
,
y
,
pos
.
Page
);
this
.
delegate
.
DrawingDocument
.
NeedScrollToTargetFlag
=
false
;
this
.
delegate
.
DrawingDocument
.
NeedScrollToTargetFlag
=
false
;
global_mouseEvent
.
ClickCount
=
old_click_count
;
global_mouseEvent
.
ClickCount
=
old_click_count
;
...
...
word/Drawing/mobileTouchManager.js
View file @
592c1687
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
AscCommon
.
check_MouseDownEvent
(
e
.
touches
?
e
.
touches
[
0
]
:
e
,
true
);
AscCommon
.
check_MouseDownEvent
(
e
.
touches
?
e
.
touches
[
0
]
:
e
,
true
);
global_mouseEvent
.
KoefPixToMM
=
1
;
global_mouseEvent
.
KoefPixToMM
=
1
;
global_mouseEvent
.
LockMouse
();
global_mouseEvent
.
LockMouse
();
this
.
HtmlPage
.
m_o
Api
.
sendEvent
(
"
asc_onHidePopMenu
"
);
this
.
Api
.
sendEvent
(
"
asc_onHidePopMenu
"
);
this
.
TableCurrentMoveValueMin
=
null
;
this
.
TableCurrentMoveValueMin
=
null
;
this
.
TableCurrentMoveValueMax
=
null
;
this
.
TableCurrentMoveValueMax
=
null
;
...
@@ -270,22 +270,7 @@
...
@@ -270,22 +270,7 @@
{
{
case
AscCommon
.
MobileTouchMode
.
Cursor
:
case
AscCommon
.
MobileTouchMode
.
Cursor
:
{
{
var
pos
=
this
.
DrawingDocument
.
ConvertCoordsFromCursor2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
this
.
MoveCursorToPoint
(
true
);
var
old_click_count
=
global_mouseEvent
.
ClickCount
;
global_mouseEvent
.
ClickCount
=
1
;
var
nearPos
=
this
.
LogicDocument
.
Get_NearestPos
(
pos
.
Page
,
pos
.
X
,
pos
.
Y
);
this
.
DrawingDocument
.
NeedScrollToTargetFlag
=
true
;
global_mouseEvent
.
Type
=
AscCommon
.
g_mouse_event_type_down
;
this
.
LogicDocument
.
OnMouseDown
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
+
nearPos
.
Height
/
2
,
pos
.
Page
);
global_mouseEvent
.
Type
=
AscCommon
.
g_mouse_event_type_up
;
this
.
LogicDocument
.
OnMouseUp
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
+
nearPos
.
Height
/
2
,
pos
.
Page
);
this
.
DrawingDocument
.
NeedScrollToTargetFlag
=
false
;
global_mouseEvent
.
ClickCount
=
old_click_count
;
break
;
break
;
}
}
case
AscCommon
.
MobileTouchMode
.
Scroll
:
case
AscCommon
.
MobileTouchMode
.
Scroll
:
...
@@ -294,39 +279,11 @@
...
@@ -294,39 +279,11 @@
if
((
_newTime
-
this
.
TimeDown
)
>
this
.
ReadingGlassTime
&&
!
this
.
MoveAfterDown
)
if
((
_newTime
-
this
.
TimeDown
)
>
this
.
ReadingGlassTime
&&
!
this
.
MoveAfterDown
)
{
{
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
Cursor
;
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
Cursor
;
this
.
MoveCursorToPoint
(
false
);
var
pos
=
this
.
DrawingDocument
.
ConvertCoordsFromCursor2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
var
old_click_count
=
global_mouseEvent
.
ClickCount
;
global_mouseEvent
.
ClickCount
=
1
;
var
nearPos
=
this
.
LogicDocument
.
Get_NearestPos
(
pos
.
Page
,
pos
.
X
,
pos
.
Y
);
this
.
DrawingDocument
.
NeedScrollToTargetFlag
=
true
;
global_mouseEvent
.
Type
=
AscCommon
.
g_mouse_event_type_down
;
this
.
LogicDocument
.
OnMouseDown
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
,
pos
.
Page
);
global_mouseEvent
.
Type
=
AscCommon
.
g_mouse_event_type_up
;
this
.
LogicDocument
.
OnMouseUp
(
global_mouseEvent
,
nearPos
.
X
,
nearPos
.
Y
,
pos
.
Page
);
this
.
DrawingDocument
.
NeedScrollToTargetFlag
=
false
;
global_mouseEvent
.
ClickCount
=
old_click_count
;
}
}
else
else
{
{
var
_offsetX
=
global_mouseEvent
.
X
-
this
.
DownPointOriginal
.
X
;
var
_offsetY
=
global_mouseEvent
.
Y
-
this
.
DownPointOriginal
.
Y
;
this
.
iScroll
.
_move
(
e
);
this
.
iScroll
.
_move
(
e
);
/*
if (_offsetX != 0 && this.HtmlPage.m_dScrollX_max > 0)
{
this.HtmlPage.m_oScrollHorApi.scrollToX(this.ScrollH - _offsetX);
}
if (_offsetY != 0 && this.HtmlPage.m_dScrollY_max > 0)
{
this.HtmlPage.m_oScrollVerApi.scrollToY(this.ScrollV - _offsetY);
}*/
AscCommon
.
stopEvent
(
e
);
AscCommon
.
stopEvent
(
e
);
}
}
break
;
break
;
...
@@ -369,7 +326,7 @@
...
@@ -369,7 +326,7 @@
}
}
case
AscCommon
.
MobileTouchMode
.
FlowObj
:
case
AscCommon
.
MobileTouchMode
.
FlowObj
:
{
{
this
.
HtmlPage
.
o
nMouseMove
(
e
.
touches
?
e
.
touches
[
0
]
:
e
);
this
.
delegate
.
Drawing_O
nMouseMove
(
e
.
touches
?
e
.
touches
[
0
]
:
e
);
AscCommon
.
stopEvent
(
e
);
AscCommon
.
stopEvent
(
e
);
break
;
break
;
}
}
...
@@ -377,24 +334,25 @@
...
@@ -377,24 +334,25 @@
{
{
// во время движения может смениться порядок ректов
// во время движения может смениться порядок ректов
global_mouseEvent
.
ClickCount
=
1
;
global_mouseEvent
.
ClickCount
=
1
;
var
pos
=
this
.
DrawingDocument
.
ConvertCoordsFromCursor2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
var
pos
=
this
.
delegate
.
ConvertCoordsFromCursor
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
this
.
LogicDocument
.
OnMouseMove
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
this
.
delegate
.
Logic_
OnMouseMove
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
AscCommon
.
stopEvent
(
e
);
AscCommon
.
stopEvent
(
e
);
break
;
break
;
}
}
case
AscCommon
.
MobileTouchMode
.
TableMove
:
case
AscCommon
.
MobileTouchMode
.
TableMove
:
{
{
this
.
HtmlPage
.
o
nMouseMove
(
e
.
touches
?
e
.
touches
[
0
]
:
e
);
this
.
delegate
.
Drawing_O
nMouseMove
(
e
.
touches
?
e
.
touches
[
0
]
:
e
);
AscCommon
.
stopEvent
(
e
);
AscCommon
.
stopEvent
(
e
);
break
;
break
;
}
}
case
AscCommon
.
MobileTouchMode
.
TableRuler
:
case
AscCommon
.
MobileTouchMode
.
TableRuler
:
{
{
var
pos
=
this
.
DrawingDocument
.
ConvertCoordsFromCursorPage
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
,
this
.
DrawingDocument
.
TableOutlineDr
.
CurrentPageIndex
);
var
DrawingDocument
=
this
.
delegate
.
DrawingDocument
;
var
pos
=
DrawingDocument
.
ConvertCoordsFromCursorPage
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
,
DrawingDocument
.
TableOutlineDr
.
CurrentPageIndex
);
var
_Transform
=
null
;
var
_Transform
=
null
;
if
(
this
.
DrawingDocument
.
TableOutlineDr
)
if
(
DrawingDocument
.
TableOutlineDr
)
_Transform
=
this
.
DrawingDocument
.
TableOutlineDr
.
TableMatrix
;
_Transform
=
DrawingDocument
.
TableOutlineDr
.
TableMatrix
;
if
(
_Transform
&&
!
global_MatrixTransformer
.
IsIdentity
(
_Transform
))
if
(
_Transform
&&
!
global_MatrixTransformer
.
IsIdentity
(
_Transform
))
{
{
...
@@ -438,7 +396,7 @@
...
@@ -438,7 +396,7 @@
this
.
TableCurrentMoveValue
=
this
.
TableCurrentMoveValueMax
;
this
.
TableCurrentMoveValue
=
this
.
TableCurrentMoveValueMax
;
}
}
}
}
this
.
HtmlPage
.
OnUpdateOverlay
();
this
.
delegate
.
HtmlPage
.
OnUpdateOverlay
();
AscCommon
.
stopEvent
(
e
);
AscCommon
.
stopEvent
(
e
);
break
;
break
;
...
@@ -474,24 +432,8 @@
...
@@ -474,24 +432,8 @@
if
(
!
this
.
MoveAfterDown
)
if
(
!
this
.
MoveAfterDown
)
{
{
global_mouseEvent
.
Button
=
0
;
global_mouseEvent
.
Button
=
0
;
var
pos
=
this
.
DrawingDocument
.
ConvertCoordsFromCursor2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
this
.
MoveCursorToPoint
(
false
);
this
.
Api
.
sendEvent
(
"
asc_onTapEvent
"
,
e
);
this
.
LogicDocument
.
OnMouseDown
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
global_mouseEvent
.
Type
=
AscCommon
.
g_mouse_event_type_up
;
this
.
LogicDocument
.
OnMouseUp
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
this
.
LogicDocument
.
Document_UpdateInterfaceState
();
var
horRuler
=
this
.
HtmlPage
.
m_oHorRuler
;
var
_oldRulerType
=
horRuler
.
CurrentObjectType
;
this
.
LogicDocument
.
Document_UpdateRulersState
();
if
(
horRuler
.
CurrentObjectType
!=
_oldRulerType
)
this
.
HtmlPage
.
OnUpdateOverlay
();
this
.
LogicDocument
.
Update_CursorType
(
pos
.
X
,
pos
.
Y
,
pos
.
Page
,
global_mouseEvent
);
this
.
HtmlPage
.
m_oApi
.
sendEvent
(
"
asc_onTapEvent
"
,
e
);
}
}
else
else
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment