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
78dd56b3
Commit
78dd56b3
authored
Jan 19, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0ce8e30b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
8 deletions
+83
-8
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+2
-0
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+21
-0
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+6
-3
slide/Drawing/mobileTouchManager.js
slide/Drawing/mobileTouchManager.js
+54
-5
No files found.
common/Scrolls/mobileTouchManagerBase.js
View file @
78dd56b3
...
...
@@ -1592,6 +1592,8 @@
global_mouseEvent
.
ClickCount
=
1
;
var
nearPos
=
this
.
delegate
.
Logic_GetNearestPos
(
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
if
(
!
nearPos
)
return
;
this
.
delegate
.
DrawingDocument
.
NeedScrollToTargetFlag
=
true
;
var
y
=
nearPos
.
Y
;
...
...
slide/Drawing/DrawingDocument.js
View file @
78dd56b3
...
...
@@ -1434,6 +1434,27 @@ function CDrawingDocument()
return
{
X
:
x_pix
,
Y
:
y_pix
,
Error
:
false
};
}
this
.
ConvertCoordsToCursor3
=
function
(
x
,
y
,
isGlobal
)
{
var
dKoef
=
(
this
.
m_oWordControl
.
m_nZoomValue
*
g_dKoef_mm_to_pix
/
100
);
var
_x
=
0
;
var
_y
=
0
;
if
(
isGlobal
)
{
_x
=
this
.
m_oWordControl
.
X
;
_y
=
this
.
m_oWordControl
.
Y
;
_x
+=
(
this
.
m_oWordControl
.
m_oMainContent
.
AbsolutePosition
.
L
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
;
_y
+=
(
this
.
m_oWordControl
.
m_oMainContent
.
AbsolutePosition
.
T
+
this
.
m_oWordControl
.
m_oMainView
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
;
}
var
x_pix
=
(
this
.
SlideCurrectRect
.
left
+
x
*
dKoef
+
_x
)
>>
0
;
var
y_pix
=
(
this
.
SlideCurrectRect
.
top
+
y
*
dKoef
+
_y
)
>>
0
;
return
{
X
:
x_pix
,
Y
:
y_pix
,
Error
:
false
};
}
this
.
ConvertCoordsToCursorWR_2
=
function
(
x
,
y
)
{
var
_word_control
=
this
.
m_oWordControl
;
...
...
slide/Drawing/HtmlPage.js
View file @
78dd56b3
...
...
@@ -679,9 +679,12 @@ function CEditorPage(api)
window.onkeyup = this.onKeyUp;
*/
this
.
m_oBody
.
HtmlElement
.
onmousemove
=
this
.
onBodyMouseMove
;
this
.
m_oBody
.
HtmlElement
.
onmousedown
=
this
.
onBodyMouseDown
;
this
.
m_oBody
.
HtmlElement
.
onmouseup
=
this
.
onBodyMouseUp
;
if
(
!
this
.
m_oApi
.
isMobileVersion
)
{
this
.
m_oBody
.
HtmlElement
.
onmousemove
=
this
.
onBodyMouseMove
;
this
.
m_oBody
.
HtmlElement
.
onmousedown
=
this
.
onBodyMouseDown
;
this
.
m_oBody
.
HtmlElement
.
onmouseup
=
this
.
onBodyMouseUp
;
}
this
.
initEvents2MobileAdvances
();
...
...
slide/Drawing/mobileTouchManager.js
View file @
78dd56b3
...
...
@@ -51,11 +51,7 @@
CMobileDelegateEditorPresentation
.
prototype
.
ConvertCoordsToCursor
=
function
(
x
,
y
,
page
,
isGlobal
)
{
return
this
.
DrawingDocument
.
ConvertCoordsToCursor
(
x
,
y
);
if
(
isGlobal
)
return
this
.
DrawingDocument
.
ConvertCoordsToCursor
(
x
,
y
);
else
return
this
.
DrawingDocument
.
ConvertCoordsToCursorWR
(
x
,
y
);
return
this
.
DrawingDocument
.
ConvertCoordsToCursor3
(
x
,
y
,
isGlobal
);
};
CMobileDelegateEditorPresentation
.
prototype
.
ConvertCoordsFromCursor
=
function
(
x
,
y
)
{
...
...
@@ -233,6 +229,11 @@
return
{
X
:
_posX
,
Y
:
_posY
,
Mode
:
_mode
};
};
CMobileDelegateEditorPresentation
.
prototype
.
Logic_GetNearestPos
=
function
(
x
,
y
,
page
)
{
return
this
.
LogicDocument
.
Slides
[
this
.
LogicDocument
.
CurPage
].
graphicObjects
.
getNearestPos
(
x
,
y
);
};
/**
* @extends {AscCommon.CMobileTouchManagerBase}
*/
...
...
@@ -843,6 +844,54 @@
return
ret
;
};
CMobileTouchManager
.
prototype
.
CheckSelectTrack
=
function
()
{
// сдвиг относительно табнейлов => нужно переопределить
if
(
!
this
.
SelectEnabled
)
return
false
;
var
_matrix
=
this
.
delegate
.
GetSelectionTransform
();
if
(
_matrix
&&
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
_matrix
=
null
;
// проверим на попадание в селект - это может произойти на любом mode
if
(
null
!=
this
.
RectSelect1
&&
null
!=
this
.
RectSelect2
)
{
var
pos1
=
null
;
var
pos4
=
null
;
if
(
!
_matrix
)
{
pos1
=
this
.
delegate
.
ConvertCoordsToCursor
(
this
.
RectSelect1
.
x
,
this
.
RectSelect1
.
y
,
this
.
PageSelect1
,
true
);
pos4
=
this
.
delegate
.
ConvertCoordsToCursor
(
this
.
RectSelect2
.
x
+
this
.
RectSelect2
.
w
,
this
.
RectSelect2
.
y
+
this
.
RectSelect2
.
h
,
this
.
PageSelect2
,
true
);
}
else
{
var
_xx1
=
_matrix
.
TransformPointX
(
this
.
RectSelect1
.
x
,
this
.
RectSelect1
.
y
);
var
_yy1
=
_matrix
.
TransformPointY
(
this
.
RectSelect1
.
x
,
this
.
RectSelect1
.
y
);
var
_xx2
=
_matrix
.
TransformPointX
(
this
.
RectSelect2
.
x
+
this
.
RectSelect2
.
w
,
this
.
RectSelect2
.
y
+
this
.
RectSelect2
.
h
);
var
_yy2
=
_matrix
.
TransformPointY
(
this
.
RectSelect2
.
x
+
this
.
RectSelect2
.
w
,
this
.
RectSelect2
.
y
+
this
.
RectSelect2
.
h
);
pos1
=
this
.
delegate
.
ConvertCoordsToCursor
(
_xx1
,
_yy1
,
this
.
PageSelect1
,
true
);
pos4
=
this
.
delegate
.
ConvertCoordsToCursor
(
_xx2
,
_yy2
,
this
.
PageSelect2
,
true
);
}
if
(
Math
.
abs
(
pos1
.
X
-
global_mouseEvent
.
X
)
<
this
.
TrackTargetEps
&&
Math
.
abs
(
pos1
.
Y
-
global_mouseEvent
.
Y
)
<
this
.
TrackTargetEps
)
{
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
Select
;
this
.
DragSelect
=
1
;
}
else
if
(
Math
.
abs
(
pos4
.
X
-
global_mouseEvent
.
X
)
<
this
.
TrackTargetEps
&&
Math
.
abs
(
pos4
.
Y
-
global_mouseEvent
.
Y
)
<
this
.
TrackTargetEps
)
{
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
Select
;
this
.
DragSelect
=
2
;
}
}
return
(
this
.
Mode
==
AscCommon
.
MobileTouchMode
.
Select
);
};
/**************************************************************************/
/**
* @extends {AscCommon.CMobileDelegateSimple}
...
...
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