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
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
...
...
@@ -110,7 +110,10 @@ function CTableOutlineDr()
this
.
IsChangeSmall
=
true
;
this
.
ChangeSmallPoint
=
null
;
this
.
checkMouseDown
=
function
(
pos
,
word_control
)
this
.
TableMatrix
=
null
;
this
.
CurrentPageIndex
=
null
;
this
.
checkMouseDown
=
function
(
pos
,
word_control
)
{
if
(
null
==
this
.
TableOutline
)
return
false
;
...
...
@@ -121,6 +124,36 @@ function CTableOutlineDr()
this
.
IsChangeSmall
=
true
;
this
.
ChangeSmallPoint
=
pos
;
this
.
CurPos
=
{
X
:
this
.
ChangeSmallPoint
.
X
,
Y
:
this
.
ChangeSmallPoint
.
Y
,
Page
:
this
.
ChangeSmallPoint
.
Page
};
this
.
TrackOffsetX
=
0
;
this
.
TrackOffsetY
=
0
;
if
(
!
this
.
TableMatrix
||
global_MatrixTransformer
.
IsIdentity
(
this
.
TableMatrix
))
{
if
(
word_control
.
MobileTouchManager
)
{
var
_move_point
=
word_control
.
MobileTouchManager
.
TableMovePoint
;
if
(
_move_point
==
null
||
pos
.
Page
!=
_table_track
.
PageNum
)
return
false
;
var
_pos1
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursorWR
(
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
var
_pos2
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursorWR
(
_move_point
.
X
,
_move_point
.
Y
,
pos
.
Page
);
var
_eps
=
word_control
.
MobileTouchManager
.
TrackTargetEps
;
var
_offset1
=
word_control
.
MobileTouchManager
.
TableRulersRectOffset
;
var
_offset2
=
_offset1
+
word_control
.
MobileTouchManager
.
TableRulersRectSize
;
if
((
_pos1
.
X
>=
(
_pos2
.
X
-
_offset2
-
_eps
))
&&
(
_pos1
.
X
<=
(
_pos2
.
X
-
_offset1
+
_eps
))
&&
(
_pos1
.
Y
>=
(
_pos2
.
Y
-
_offset2
-
_eps
))
&&
(
_pos1
.
Y
<=
(
_pos2
.
Y
-
_offset1
+
_eps
)))
{
this
.
TrackTablePos
=
0
;
return
true
;
}
return
false
;
}
switch
(
this
.
TrackTablePos
)
{
case
1
:
...
...
@@ -134,6 +167,9 @@ function CTableOutlineDr()
{
this
.
TrackOffsetX
=
pos
.
X
-
_x
;
this
.
TrackOffsetY
=
pos
.
Y
-
_b
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
...
...
@@ -164,6 +200,9 @@ function CTableOutlineDr()
{
this
.
TrackOffsetX
=
pos
.
X
-
_r
;
this
.
TrackOffsetY
=
pos
.
Y
-
_y
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
...
...
@@ -180,16 +219,128 @@ function CTableOutlineDr()
{
this
.
TrackOffsetX
=
pos
.
X
-
_r
;
this
.
TrackOffsetY
=
pos
.
Y
-
_b
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
}
}
}
else
{
if
(
word_control
.
MobileTouchManager
)
{
var
_invert
=
global_MatrixTransformer
.
Invert
(
this
.
TableMatrix
);
var
_posx
=
_invert
.
TransformPointX
(
pos
.
X
,
pos
.
Y
);
var
_posy
=
_invert
.
TransformPointY
(
pos
.
X
,
pos
.
Y
);
var
_move_point
=
word_control
.
MobileTouchManager
.
TableMovePoint
;
if
(
_move_point
==
null
||
pos
.
Page
!=
_table_track
.
PageNum
)
return
false
;
var
_koef
=
g_dKoef_pix_to_mm
*
100
/
word_control
.
m_nZoomValue
;
var
_eps
=
word_control
.
MobileTouchManager
.
TrackTargetEps
*
_koef
;
var
_offset1
=
word_control
.
MobileTouchManager
.
TableRulersRectOffset
*
_koef
;
var
_offset2
=
_offset1
+
word_control
.
MobileTouchManager
.
TableRulersRectSize
*
_koef
;
if
((
_posx
>=
(
_move_point
.
X
-
_offset2
-
_eps
))
&&
(
_posx
<=
(
_move_point
.
X
-
_offset1
+
_eps
))
&&
(
_posy
>=
(
_move_point
.
Y
-
_offset2
-
_eps
))
&&
(
_posy
<=
(
_move_point
.
Y
-
_offset1
+
_eps
)))
{
this
.
TrackTablePos
=
0
;
return
true
;
}
return
false
;
}
var
_invert
=
global_MatrixTransformer
.
Invert
(
this
.
TableMatrix
);
var
_posx
=
_invert
.
TransformPointX
(
pos
.
X
,
pos
.
Y
);
var
_posy
=
_invert
.
TransformPointY
(
pos
.
X
,
pos
.
Y
);
switch
(
this
.
TrackTablePos
)
{
case
1
:
{
var
_x
=
_table_track
.
X
+
_table_track
.
W
;
var
_b
=
_table_track
.
Y
;
var
_y
=
_b
-
_d
;
var
_r
=
_x
+
_d
;
if
((
_posx
>
_x
)
&&
(
_posx
<
_r
)
&&
(
_posy
>
_y
)
&&
(
_posy
<
_b
))
{
this
.
TrackOffsetX
=
_posx
-
_x
;
this
.
TrackOffsetY
=
_posy
-
_b
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
}
case
2
:
{
var
_x
=
_table_track
.
X
+
_table_track
.
W
;
var
_y
=
_table_track
.
Y
+
_table_track
.
H
;
var
_r
=
_x
+
_d
;
var
_b
=
_y
+
_d
;
if
((
_posx
>
_x
)
&&
(
_posx
<
_r
)
&&
(
_posy
>
_y
)
&&
(
_posy
<
_b
))
{
this
.
TrackOffsetX
=
_posx
-
_x
;
this
.
TrackOffsetY
=
_posy
-
_y
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
}
case
3
:
{
var
_r
=
_table_track
.
X
;
var
_x
=
_r
-
_d
;
var
_y
=
_table_track
.
Y
+
_table_track
.
H
;
var
_b
=
_y
+
_d
;
if
((
_posx
>
_x
)
&&
(
_posx
<
_r
)
&&
(
_posy
>
_y
)
&&
(
_posy
<
_b
))
{
this
.
TrackOffsetX
=
_posx
-
_r
;
this
.
TrackOffsetY
=
_posy
-
_y
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
}
case
0
:
default
:
{
var
_r
=
_table_track
.
X
;
var
_b
=
_table_track
.
Y
;
var
_x
=
_r
-
_d
;
var
_y
=
_b
-
_d
;
if
((
_posx
>
_x
)
&&
(
_posx
<
_r
)
&&
(
_posy
>
_y
)
&&
(
_posy
<
_b
))
{
this
.
TrackOffsetX
=
_posx
-
_r
;
this
.
TrackOffsetY
=
_posy
-
_b
;
this
.
CurPos
.
X
-=
this
.
TrackOffsetX
;
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
return
true
;
}
return
false
;
}
}
}
return
false
;
}
this
.
checkMouseUp
=
function
(
X
,
Y
,
word_control
)
this
.
checkMouseUp
=
function
(
X
,
Y
,
word_control
)
{
this
.
bIsTracked
=
false
;
...
...
@@ -201,68 +352,58 @@ function CTableOutlineDr()
var
_outline
=
this
.
TableOutline
;
var
_table
=
_outline
.
Table
;
_table
.
Cursor_MoveToStartPos
();
_table
.
Document_SetThisElementCurrent
(
true
);
if
(
!
_table
.
Is_Inline
())
{
word_control
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Presentation_TableMoveFromRulers
)
;
var
pos
;
switch
(
this
.
TrackTablePos
)
{
case
1
:
{
var
_w_pix
=
this
.
TableOutline
.
W
*
g_dKoef_mm_to_pix
*
word_control
.
m_nZoomValue
/
100
;
var
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
-
_w_pix
,
Y
);
_table
.
Move
(
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
,
pos
.
Page
);
_outline
.
X
=
pos
.
X
-
this
.
TrackOffsetX
;
_outline
.
Y
=
pos
.
Y
-
this
.
TrackOffsetY
;
_outline
.
PageNum
=
pos
.
Page
;
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
-
_w_pix
,
Y
);
break
;
}
case
2
:
{
var
_w_pix
=
this
.
TableOutline
.
W
*
g_dKoef_mm_to_pix
*
word_control
.
m_nZoomValue
/
100
;
var
_h_pix
=
this
.
TableOutline
.
H
*
g_dKoef_mm_to_pix
*
word_control
.
m_nZoomValue
/
100
;
var
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
-
_w_pix
,
Y
-
_h_pix
);
_table
.
Move
(
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
,
pos
.
Page
);
_outline
.
X
=
pos
.
X
-
this
.
TrackOffsetX
;
_outline
.
Y
=
pos
.
Y
-
this
.
TrackOffsetY
;
_outline
.
PageNum
=
pos
.
Page
;
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
-
_w_pix
,
Y
-
_h_pix
);
break
;
}
case
3
:
{
var
_h_pix
=
this
.
TableOutline
.
H
*
g_dKoef_mm_to_pix
*
word_control
.
m_nZoomValue
/
100
;
var
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
,
Y
-
_h_pix
);
_table
.
Move
(
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
,
pos
.
Page
);
_outline
.
X
=
pos
.
X
-
this
.
TrackOffsetX
;
_outline
.
Y
=
pos
.
Y
-
this
.
TrackOffsetY
;
_outline
.
PageNum
=
pos
.
Page
;
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
,
Y
-
_h_pix
);
break
;
}
case
0
:
default
:
{
var
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
,
Y
);
_table
.
Move
(
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
,
pos
.
Page
);
_outline
.
X
=
pos
.
X
-
this
.
TrackOffsetX
;
_outline
.
Y
=
pos
.
Y
-
this
.
TrackOffsetY
;
_outline
.
PageNum
=
pos
.
Page
;
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsFromCursor2
(
X
,
Y
);
break
;
}
}
var
NearestPos
=
word_control
.
m_oLogicDocument
.
Get_NearestPos
(
pos
.
Page
,
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
);
_table
.
Move
(
pos
.
X
-
this
.
TrackOffsetX
,
pos
.
Y
-
this
.
TrackOffsetY
,
pos
.
Page
,
NearestPos
);
_outline
.
X
=
pos
.
X
-
this
.
TrackOffsetX
;
_outline
.
Y
=
pos
.
Y
-
this
.
TrackOffsetY
;
_outline
.
PageNum
=
pos
.
Page
;
}
else
{
if
(
null
!=
this
.
InlinePos
)
{
// inline move
word_control
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Presentation_TableMoveFromRulersInline
);
_table
.
Move
(
this
.
InlinePos
.
X
,
this
.
InlinePos
.
Y
,
this
.
InlinePos
.
Page
);
_table
.
Move
(
this
.
InlinePos
.
X
,
this
.
InlinePos
.
Y
,
this
.
InlinePos
.
Page
,
this
.
InlinePos
);
}
}
_table
.
Cursor_MoveToStartPos
();
_table
.
Document_SetThisElementCurrent
();
}
this
.
checkMouseMove
=
function
(
X
,
Y
,
word_control
)
this
.
checkMouseMove
=
function
(
X
,
Y
,
word_control
)
{
if
(
null
==
this
.
TableOutline
)
return
false
;
...
...
@@ -273,7 +414,11 @@ function CTableOutlineDr()
var
_dist
=
15
*
g_dKoef_pix_to_mm
*
100
/
word_control
.
m_nZoomValue
;
if
((
Math
.
abs
(
_pos
.
X
-
this
.
ChangeSmallPoint
.
X
)
<
_dist
)
&&
(
Math
.
abs
(
_pos
.
Y
-
this
.
ChangeSmallPoint
.
Y
)
<
_dist
)
&&
(
_pos
.
Page
==
this
.
ChangeSmallPoint
.
Page
))
{
this
.
CurPos
=
{
X
:
this
.
ChangeSmallPoint
.
X
,
Y
:
this
.
ChangeSmallPoint
.
Y
,
Page
:
this
.
ChangeSmallPoint
.
Page
};
this
.
CurPos
=
{
X
:
this
.
ChangeSmallPoint
.
X
,
Y
:
this
.
ChangeSmallPoint
.
Y
,
Page
:
this
.
ChangeSmallPoint
.
Page
};
switch
(
this
.
TrackTablePos
)
{
...
...
@@ -307,6 +452,7 @@ function CTableOutlineDr()
this
.
IsChangeSmall
=
false
;
this
.
TableOutline
.
Table
.
Selection_Remove
();
this
.
TableOutline
.
Table
.
Cursor_MoveToStartPos
();
editor
.
WordControl
.
m_oLogicDocument
.
Document_UpdateSelectionState
();
}
...
...
@@ -344,7 +490,13 @@ function CTableOutlineDr()
this
.
CurPos
.
Y
-=
this
.
TrackOffsetY
;
}
this
.
CheckStartTrack
=
function
(
word_control
)
this
.
CheckStartTrack
=
function
(
word_control
,
transform
)
{
this
.
TableMatrix
=
null
;
if
(
transform
)
this
.
TableMatrix
=
transform
.
CreateDublicate
();
if
(
!
this
.
TableMatrix
||
global_MatrixTransformer
.
IsIdentity
(
this
.
TableMatrix
))
{
var
pos
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursor
(
this
.
TableOutline
.
X
,
this
.
TableOutline
.
Y
,
this
.
TableOutline
.
PageNum
,
true
);
...
...
@@ -368,6 +520,61 @@ function CTableOutlineDr()
this
.
TrackTablePos
=
0
;
}
}
else
{
var
_x
=
this
.
TableOutline
.
X
;
var
_y
=
this
.
TableOutline
.
Y
;
var
_r
=
_x
+
this
.
TableOutline
.
W
;
var
_b
=
_y
+
this
.
TableOutline
.
H
;
var
x0
=
transform
.
TransformPointX
(
_x
,
_y
);
var
y0
=
transform
.
TransformPointY
(
_x
,
_y
);
var
x1
=
transform
.
TransformPointX
(
_r
,
_y
);
var
y1
=
transform
.
TransformPointY
(
_r
,
_y
);
var
x2
=
transform
.
TransformPointX
(
_r
,
_b
);
var
y2
=
transform
.
TransformPointY
(
_r
,
_b
);
var
x3
=
transform
.
TransformPointX
(
_x
,
_b
);
var
y3
=
transform
.
TransformPointY
(
_x
,
_b
);
var
_x0
=
word_control
.
m_oEditor
.
AbsolutePosition
.
L
*
g_dKoef_mm_to_pix
;
var
_y0
=
word_control
.
m_oEditor
.
AbsolutePosition
.
T
*
g_dKoef_mm_to_pix
;
var
_x1
=
word_control
.
m_oEditor
.
AbsolutePosition
.
R
*
g_dKoef_mm_to_pix
;
var
_y1
=
word_control
.
m_oEditor
.
AbsolutePosition
.
B
*
g_dKoef_mm_to_pix
;
var
pos0
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursor
(
x0
,
y0
,
this
.
TableOutline
.
PageNum
,
true
);
if
(
pos0
.
X
>
_x0
&&
pos0
.
X
<
_x1
&&
pos0
.
Y
>
_y0
&&
pos0
.
Y
<
_y1
)
{
this
.
TrackTablePos
=
0
;
return
;
}
pos0
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursor
(
x1
,
y1
,
this
.
TableOutline
.
PageNum
,
true
);
if
(
pos0
.
X
>
_x0
&&
pos0
.
X
<
_x1
&&
pos0
.
Y
>
_y0
&&
pos0
.
Y
<
_y1
)
{
this
.
TrackTablePos
=
1
;
return
;
}
pos0
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursor
(
x3
,
y3
,
this
.
TableOutline
.
PageNum
,
true
);
if
(
pos0
.
X
>
_x0
&&
pos0
.
X
<
_x1
&&
pos0
.
Y
>
_y0
&&
pos0
.
Y
<
_y1
)
{
this
.
TrackTablePos
=
3
;
return
;
}
pos0
=
word_control
.
m_oDrawingDocument
.
ConvertCoordsToCursor
(
x2
,
y2
,
this
.
TableOutline
.
PageNum
,
true
);
if
(
pos0
.
X
>
_x0
&&
pos0
.
X
<
_x1
&&
pos0
.
Y
>
_y0
&&
pos0
.
Y
<
_y1
)
{
this
.
TrackTablePos
=
2
;
return
;
}
this
.
TrackTablePos
=
0
;
}
}
}
function
CCacheImage
()
...
...
@@ -809,14 +1016,40 @@ function CDrawingDocument()
this
.
TargetCursorColor
.
B
=
b
;
}
this
.
StartTrackTable
=
function
()
this
.
StartTrackTable
=
function
(
obj
,
transform
)
{
if
(
this
.
m_oWordControl
.
MobileTouchManager
)
{
if
(
!
this
.
m_oWordControl
.
MobileTouchManager
.
TableStartTrack_Check
)
return
;
}
this
.
TableOutlineDr
.
TableOutline
=
obj
;
this
.
TableOutlineDr
.
Counter
=
0
;
this
.
TableOutlineDr
.
bIsNoTable
=
false
;
this
.
TableOutlineDr
.
CheckStartTrack
(
this
.
m_oWordControl
,
transform
);
if
(
this
.
m_oWordControl
.
MobileTouchManager
)
this
.
m_oWordControl
.
OnUpdateOverlay
();
};
this
.
EndTrackTable
=
function
(
pointer
,
bIsAttack
)
{
if
(
this
.
TableOutlineDr
.
TableOutline
!=
null
)
{
if
(
pointer
==
this
.
TableOutlineDr
.
TableOutline
.
Table
||
bIsAttack
)
{
this
.
TableOutlineDr
.
TableOutline
=
null
;
this
.
TableOutlineDr
.
Counter
=
0
;
}
}
};
this
.
OnRecalculatePage
=
function
(
index
,
pageObject
)
{
if
(
this
.
m_oWordControl
&&
this
.
m_oWordControl
.
MobileTouchManager
)
{
this
.
m_oWordControl
.
MobileTouchManager
.
ClearContextMenu
();
}
editor
.
sendEvent
(
"
asc_onDocumentChanged
"
);
...
...
@@ -1995,6 +2228,7 @@ function CDrawingDocument()
}
hor_ruler
.
CalculateMargins
();
this
.
TableOutlineDr
.
CurrentPageIndex
=
this
.
m_lCurrentPage
;
if
(
0
<=
this
.
SlideCurrent
&&
this
.
SlideCurrent
<
this
.
SlidesCount
)
{
...
...
@@ -2011,13 +2245,17 @@ function CDrawingDocument()
this
.
m_oWordControl
.
UpdateHorRuler
();
}
this
.
m_oWordControl
.
UpdateVerRuler
();
if
(
this
.
m_oWordControl
.
MobileTouchManager
)
{
this
.
m_oWordControl
.
MobileTouchManager
.
TableStartTrack_Check
=
true
;
markup
.
Table
.
Start_TrackTable
();
this
.
m_oWordControl
.
MobileTouchManager
.
TableStartTrack_Check
=
false
;
}
}
this
.
Set_RulerState_Paragraph
=
function
(
obj
,
margins
)
{
if
(
!
this
.
m_oWordControl
.
m_bIsRuler
)
return
;
var
hor_ruler
=
this
.
m_oWordControl
.
m_oHorRuler
;
var
ver_ruler
=
this
.
m_oWordControl
.
m_oVerRuler
;
...
...
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