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
1afa3c46
Commit
1afa3c46
authored
Jan 27, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile web: slides table rulers
parent
d80a1246
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
388 additions
and
122 deletions
+388
-122
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+35
-13
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+343
-105
slide/Drawing/mobileTouchManager.js
slide/Drawing/mobileTouchManager.js
+6
-3
word/Drawing/mobileTouchManager.js
word/Drawing/mobileTouchManager.js
+4
-1
No files found.
common/Scrolls/mobileTouchManagerBase.js
View file @
1afa3c46
...
...
@@ -1100,7 +1100,7 @@
},
500
);
};
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEndOld
=
function
(
isCheck
,
isSelectTouch
,
isGlassTouch
)
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEndOld
=
function
(
isCheck
,
isSelectTouch
,
isGlassTouch
,
isTableRuler
)
{
// isCheck: если пришли сюда после скролла или зума (или их анимации) - то не нужно проверять состояние редактора.
// Нужно проверять последнее сохраненной состояние
...
...
@@ -1125,7 +1125,7 @@
this
.
SendShowContextMenu
();
};
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEnd
=
function
(
isCheck
,
isSelectTouch
,
isGlassTouch
)
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEnd
=
function
(
isCheck
,
isSelectTouch
,
isGlassTouch
,
isTableRuler
)
{
// isCheck: если пришли сюда после скролла или зума (или их анимации) - то не нужно проверять состояние редактора.
// Нужно проверять последнее сохраненной состояние
...
...
@@ -1245,6 +1245,10 @@
}
}
// после таблиц не показываем меню
if
(
isTableRuler
)
isEqual
=
false
;
if
(
this
.
ContextMenuLastMode
==
oldLasdMode
&&
isEqual
)
{
this
.
ContextMenuLastModeCounter
++
;
...
...
@@ -1292,7 +1296,7 @@
// меню для текстового селекта показываем всегда
isShowContextMenu
=
(
!
isSelectCell
&&
(
this
.
ContextMenuLastMode
==
AscCommon
.
MobileTouchContextMenuType
.
Select
));
if
(
this
.
ContextMenuLastShow
)
if
(
this
.
ContextMenuLastShow
||
isTableRuler
)
{
// эмулируем пропажу меню (клик туда же)
switch
(
this
.
ContextMenuLastMode
)
...
...
@@ -1536,6 +1540,15 @@
//var _mainFillStyle = "#DFDFDF";
var
_mainFillStyle
=
"
rgba(223, 223, 223, 0.5)
"
;
var
_drawingPage
=
null
;
if
(
DrawingDocument
.
m_arrPages
)
_drawingPage
=
DrawingDocument
.
m_arrPages
[
DrawingDocument
.
m_lCurrentPage
].
drawingPage
;
else
_drawingPage
=
DrawingDocument
.
SlideCurrectRect
;
var
_posMoveX
=
0
;
var
_posMoveY
=
0
;
if
(
!
_table_outline_dr
.
TableMatrix
||
global_MatrixTransformer
.
IsIdentity
(
_table_outline_dr
.
TableMatrix
))
{
this
.
TableMovePoint
=
{
X
:
_tableOutline
.
X
,
Y
:
_tableOutline
.
Y
};
...
...
@@ -1550,6 +1563,8 @@
overlay
.
CheckPoint
(
TableMoveRect_x
,
TableMoveRect_y
);
overlay
.
CheckPoint
(
TableMoveRect_x
+
_rectWidth
,
TableMoveRect_y
+
_rectWidth
);
if
(
this
.
delegate
.
Name
!=
"
slide
"
)
ctx
.
drawImage
(
window
.
g_table_track_mobile_move
,
TableMoveRect_x
,
TableMoveRect_y
,
window
.
g_table_track_mobile_move
.
size
,
window
.
g_table_track_mobile_move
.
size
);
ctx
.
fillStyle
=
_mainFillStyle
;
...
...
@@ -1588,8 +1603,8 @@
ctx
.
beginPath
();
var
dKoef
=
(
HtmlPage
.
m_nZoomValue
*
g_dKoef_mm_to_pix
/
100
);
var
xDst
=
DrawingDocument
.
m_arrPages
[
DrawingDocument
.
m_lCurrentPage
].
drawingPage
.
left
;
var
yDst
=
DrawingDocument
.
m_arrPages
[
DrawingDocument
.
m_lCurrentPage
].
drawingPage
.
top
;
var
xDst
=
_
drawingPage
.
left
;
var
yDst
=
_
drawingPage
.
top
;
var
_oldY
=
_table_markup
.
Rows
[
0
].
Y
+
_table_markup
.
Rows
[
0
].
H
;
...
...
@@ -1640,12 +1655,12 @@
{
if
(
0
==
this
.
TableCurrentMoveDir
)
{
var
_pos
=
DrawingDocument
.
ConvertCoordsToCursorWR
(
this
.
TableCurrentMoveValue
,
0
,
_table_outline_dr
.
CurrentPageIndex
);
var
_pos
=
this
.
delegate
.
ConvertCoordsToCursor
(
this
.
TableCurrentMoveValue
,
0
,
_table_outline_dr
.
CurrentPageIndex
,
false
);
overlay
.
VertLine
(
_pos
.
X
,
true
);
}
else
{
var
_pos
=
DrawingDocument
.
ConvertCoordsToCursorWR
(
0
,
this
.
TableCurrentMoveValue
,
_table_outline_dr
.
CurrentPageIndex
);
var
_pos
=
this
.
delegate
.
ConvertCoordsToCursor
(
0
,
this
.
TableCurrentMoveValue
,
_table_outline_dr
.
CurrentPageIndex
,
false
);
overlay
.
HorLine
(
_pos
.
Y
,
true
);
}
}
...
...
@@ -1654,8 +1669,8 @@
{
var
dKoef
=
(
HtmlPage
.
m_nZoomValue
*
g_dKoef_mm_to_pix
/
100
);
var
xDst
=
DrawingDocument
.
m_arrPages
[
DrawingDocument
.
m_lCurrentPage
].
drawingPage
.
left
;
var
yDst
=
DrawingDocument
.
m_arrPages
[
DrawingDocument
.
m_lCurrentPage
].
drawingPage
.
top
;
var
xDst
=
_
drawingPage
.
left
;
var
yDst
=
_
drawingPage
.
top
;
ctx
.
lineWidth
=
1
/
dKoef
;
...
...
@@ -1694,6 +1709,7 @@
_offset
*=
2
;
}
if
(
this
.
delegate
.
Name
!=
"
slide
"
)
ctx
.
drawImage
(
window
.
g_table_track_mobile_move
,
this
.
TableMovePoint
.
X
-
_offset
,
this
.
TableMovePoint
.
Y
-
_offset
,
_rectW
,
_rectW
);
ctx
.
fillStyle
=
_mainFillStyle
;
...
...
@@ -1780,12 +1796,18 @@
{
if
(
0
==
this
.
TableCurrentMoveDir
)
{
var
_pos
=
DrawingDocument
.
ConvertCoordsToCursorWR
(
this
.
TableCurrentMoveValue
,
0
,
_table_outline_dr
.
CurrentPageIndex
,
_table_outline_dr
.
TableMatrix
);
_posMoveX
=
_table_outline_dr
.
TableMatrix
.
TransformPointX
(
this
.
TableCurrentMoveValue
,
0
);
_posMoveY
=
_table_outline_dr
.
TableMatrix
.
TransformPointY
(
this
.
TableCurrentMoveValue
,
0
);
var
_pos
=
this
.
delegate
.
ConvertCoordsToCursor
(
_posMoveX
,
_posMoveY
,
_table_outline_dr
.
CurrentPageIndex
,
false
);
overlay
.
VertLine
(
_pos
.
X
,
true
);
}
else
{
var
_pos
=
DrawingDocument
.
ConvertCoordsToCursorWR
(
0
,
this
.
TableCurrentMoveValue
,
_table_outline_dr
.
CurrentPageIndex
,
_table_outline_dr
.
TableMatrix
);
_posMoveX
=
_table_outline_dr
.
TableMatrix
.
TransformPointX
(
0
,
this
.
TableCurrentMoveValue
);
_posMoveY
=
_table_outline_dr
.
TableMatrix
.
TransformPointY
(
0
,
this
.
TableCurrentMoveValue
);
var
_pos
=
this
.
delegate
.
ConvertCoordsToCursor
(
_posMoveX
,
_posMoveY
,
_table_outline_dr
.
CurrentPageIndex
,
false
);
overlay
.
HorLine
(
_pos
.
Y
,
true
);
}
}
...
...
slide/Drawing/DrawingDocument.js
View file @
1afa3c46
This diff is collapsed.
Click to expand it.
slide/Drawing/mobileTouchManager.js
View file @
1afa3c46
...
...
@@ -668,7 +668,7 @@
case
AscCommon
.
MobileTouchMode
.
TableRuler
:
{
var
DrawingDocument
=
this
.
delegate
.
DrawingDocument
;
var
pos
=
DrawingDocument
.
ConvertCoordsFromCursor
Page
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
,
DrawingDocument
.
TableOutlineDr
.
CurrentPageIndex
);
var
pos
=
DrawingDocument
.
ConvertCoordsFromCursor
2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
var
_Transform
=
null
;
if
(
DrawingDocument
.
TableOutlineDr
)
...
...
@@ -745,6 +745,7 @@
var
isCheckContextMenuSelect
=
false
;
var
isCheckContextMenuCursor
=
(
this
.
Mode
==
AscCommon
.
MobileTouchMode
.
Cursor
);
var
isCheckContextMenuTableRuler
=
false
;
var
isPreventDefault
=
false
;
switch
(
this
.
Mode
)
...
...
@@ -838,6 +839,8 @@
}
case
AscCommon
.
MobileTouchMode
.
TableRuler
:
{
isCheckContextMenuTableRuler
=
true
;
var
HtmlPage
=
this
.
delegate
.
HtmlPage
;
var
DrawingDocument
=
this
.
delegate
.
DrawingDocument
;
...
...
@@ -854,7 +857,7 @@
_yOffset
+=
(
7
*
g_dKoef_mm_to_pix
);
}
var
pos
=
DrawingDocument
.
ConvertCoordsFromCursor
Page
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
,
DrawingDocument
.
TableOutlineDr
.
CurrentPageIndex
);
var
pos
=
DrawingDocument
.
ConvertCoordsFromCursor
2
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
var
_Transform
=
null
;
if
(
DrawingDocument
.
TableOutlineDr
)
...
...
@@ -939,7 +942,7 @@
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
if
(
true
!==
this
.
iScroll
.
isAnimating
)
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
,
isCheckContextMenuCursor
);
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
,
isCheckContextMenuCursor
,
isCheckContextMenuTableRuler
);
return
false
;
};
...
...
word/Drawing/mobileTouchManager.js
View file @
1afa3c46
...
...
@@ -457,6 +457,7 @@
var
isCheckContextMenuSelect
=
false
;
var
isCheckContextMenuCursor
=
(
this
.
Mode
==
AscCommon
.
MobileTouchMode
.
Cursor
);
var
isCheckContextMenuTableRuler
=
false
;
var
isPreventDefault
=
false
;
switch
(
this
.
Mode
)
...
...
@@ -550,6 +551,8 @@
}
case
AscCommon
.
MobileTouchMode
.
TableRuler
:
{
isCheckContextMenuTableRuler
=
true
;
var
HtmlPage
=
this
.
delegate
.
HtmlPage
;
var
DrawingDocument
=
this
.
delegate
.
DrawingDocument
;
...
...
@@ -651,7 +654,7 @@
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
if
(
true
!==
this
.
iScroll
.
isAnimating
)
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
,
isCheckContextMenuCursor
);
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
,
isCheckContextMenuCursor
,
isCheckContextMenuTableRuler
);
return
false
;
};
...
...
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