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
5a8eb389
Commit
5a8eb389
authored
Jan 26, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
developing...
parent
046e616d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
4 deletions
+146
-4
cell/view/mobileTouch.js
cell/view/mobileTouch.js
+3
-1
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+137
-1
slide/Drawing/mobileTouchManager.js
slide/Drawing/mobileTouchManager.js
+3
-1
word/Drawing/mobileTouchManager.js
word/Drawing/mobileTouchManager.js
+3
-1
No files found.
cell/view/mobileTouch.js
View file @
5a8eb389
...
...
@@ -756,6 +756,7 @@ function (window, undefined)
}
var
isCheckContextMenuMode
=
true
;
var
isCheckContextMenuSelect
=
false
;
var
isPreventDefault
=
false
;
switch
(
this
.
Mode
)
...
...
@@ -833,6 +834,7 @@ function (window, undefined)
this
.
Mode
=
AscCommon
.
MobileTouchMode
.
None
;
this
.
delegate
.
Drawing_OnMouseUp
(
_e
);
//AscCommon.stopEvent(e);
isCheckContextMenuSelect
=
true
;
break
;
}
default
:
...
...
@@ -843,7 +845,7 @@ function (window, undefined)
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
if
(
true
!==
this
.
iScroll
.
isAnimating
)
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
);
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
);
return
false
;
};
...
...
common/Scrolls/mobileTouchManagerBase.js
View file @
5a8eb389
...
...
@@ -1030,7 +1030,7 @@
},
500
);
};
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEnd
=
function
(
isCheck
)
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEnd
=
function
(
isCheck
,
isSelectTouch
)
{
// isCheck: если пришли сюда после скролла или зума (или их анимации) - то не нужно проверять состояние редактора.
// Нужно проверять последнее сохраненной состояние
...
...
@@ -1055,6 +1055,142 @@
this
.
SendShowContextMenu
();
};
CMobileTouchManagerBase
.
prototype
.
CheckContextMenuTouchEndNew
=
function
(
isCheck
,
isSelectTouch
)
{
// isCheck: если пришли сюда после скролла или зума (или их анимации) - то не нужно проверять состояние редактора.
// Нужно проверять последнее сохраненной состояние
var
isShowContextMenu
=
false
;
var
isSelectCell
=
false
;
if
(
isCheck
)
{
var
oldLastInfo
=
this
.
ContextMenuLastInfo
;
var
oldLasdMode
=
this
.
ContextMenuLastMode
;
this
.
ContextMenuLastMode
=
this
.
delegate
.
GetContextMenuType
();
this
.
delagate
.
GetContextMenuInfo
(
this
.
ContextMenuLastInfo
);
var
_data1
=
null
;
var
_data2
=
null
;
if
(
this
.
ContextMenuLastMode
==
oldLasdMode
)
{
var
isEqual
=
false
;
switch
(
this
.
ContextMenuLastMode
)
{
case
AscCommon
.
MobileTouchContextMenuType
.
Target
:
{
_data1
=
this
.
ContextMenuLastInfo
.
targetPos
;
_data2
=
oldLastInfo
.
targetPos
;
if
(
_data1
&&
_data2
)
{
if
(
_data1
.
Page
==
_data1
.
Page
&&
Math
.
abs
(
_data1
.
X
-
_data2
.
X
)
<
10
&&
Math
.
abs
(
_data1
.
Y
-
_data2
.
Y
)
<
10
)
{
isEqual
=
true
;
}
}
break
;
}
case
AscCommon
.
MobileTouchContextMenuType
.
Select
:
{
_data1
=
this
.
ContextMenuLastInfo
.
selectText
;
_data2
=
oldLastInfo
.
selectText
;
if
(
_data1
&&
_data2
)
{
if
(
_data1
.
Page1
==
_data2
.
Page1
&&
_data1
.
Page2
==
_data2
.
Page2
&&
Math
.
abs
(
_data1
.
X1
-
_data2
.
X1
)
<
0.1
&&
Math
.
abs
(
_data1
.
Y1
-
_data2
.
Y1
)
<
0.1
&&
Math
.
abs
(
_data1
.
X2
-
_data2
.
X2
)
<
0.1
&&
Math
.
abs
(
_data1
.
Y2
-
_data2
.
Y2
)
<
0.1
)
{
isEqual
=
true
;
}
}
else
{
_data1
=
this
.
ContextMenuLastInfo
.
selectCell
;
_data2
=
oldLastInfo
.
selectCell
;
if
(
_data1
&&
_data2
)
{
isSelectCell
=
true
;
if
(
Math
.
abs
(
_data1
.
X
-
_data2
.
X
)
<
0.1
&&
Math
.
abs
(
_data1
.
Y
-
_data2
.
Y
)
<
0.1
&&
Math
.
abs
(
_data1
.
W
-
_data2
.
W
)
<
0.1
&&
Math
.
abs
(
_data1
.
H
-
_data2
.
H
)
<
0.1
)
{
isEqual
=
true
;
}
}
}
break
;
}
case
AscCommon
.
MobileTouchContextMenuType
.
Object
:
{
_data1
=
this
.
ContextMenuLastInfo
.
objectBounds
;
_data2
=
oldLastInfo
.
objectBounds
;
if
(
_data1
&&
_data2
)
{
if
(
_data1
.
Page
==
_data2
.
Page
&&
Math
.
abs
(
_data1
.
X
-
_data2
.
X
)
<
0.1
&&
Math
.
abs
(
_data1
.
Y
-
_data2
.
Y
)
<
0.1
&&
Math
.
abs
(
_data1
.
R
-
_data2
.
R
)
<
0.1
&&
Math
.
abs
(
_data1
.
B
-
_data2
.
B
)
<
0.1
)
{
isEqual
=
true
;
}
}
break
;
}
case
AscCommon
.
MobileTouchContextMenuType
.
Slide
:
{
_data1
=
this
.
ContextMenuLastInfo
.
objectSlideThumbnail
;
_data2
=
oldLastInfo
.
objectSlideThumbnail
;
if
(
_data1
&&
_data2
)
{
if
(
_data1
.
Slide
==
_data2
.
Slide
)
isEqual
=
true
;
}
else
{
isEqual
=
true
;
}
break
;
}
default
:
break
;
}
}
if
(
this
.
ContextMenuLastMode
==
oldLasdMode
)
{
this
.
ContextMenuLastModeCounter
++
;
this
.
ContextMenuLastModeCounter
&=
0x01
;
}
else
{
this
.
ContextMenuLastModeCounter
=
0
;
}
}
else
{
}
if
(
this
.
ContextMenuLastMode
>
AscCommon
.
MobileTouchContextMenuType
.
None
&&
1
==
this
.
ContextMenuLastModeCounter
)
this
.
SendShowContextMenu
();
};
CMobileTouchManagerBase
.
prototype
.
ClearContextMenu
=
function
()
{
//this.ContextMenuLastMode = AscCommon.MobileTouchContextMenuType.None;
...
...
slide/Drawing/mobileTouchManager.js
View file @
5a8eb389
...
...
@@ -737,6 +737,7 @@
}
var
isCheckContextMenuMode
=
true
;
var
isCheckContextMenuSelect
=
false
;
var
isPreventDefault
=
false
;
switch
(
this
.
Mode
)
...
...
@@ -819,6 +820,7 @@
var
pos
=
this
.
delegate
.
ConvertCoordsFromCursor
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
this
.
delegate
.
Logic_OnMouseUp
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
AscCommon
.
stopEvent
(
e
);
isCheckContextMenuSelect
=
true
;
break
;
}
case
AscCommon
.
MobileTouchMode
.
TableMove
:
...
...
@@ -928,7 +930,7 @@
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
if
(
true
!==
this
.
iScroll
.
isAnimating
)
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
);
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
);
return
false
;
};
...
...
word/Drawing/mobileTouchManager.js
View file @
5a8eb389
...
...
@@ -458,6 +458,7 @@
}
var
isCheckContextMenuMode
=
true
;
var
isCheckContextMenuSelect
=
false
;
var
isPreventDefault
=
false
;
switch
(
this
.
Mode
)
...
...
@@ -540,6 +541,7 @@
var
pos
=
this
.
delegate
.
ConvertCoordsFromCursor
(
global_mouseEvent
.
X
,
global_mouseEvent
.
Y
);
this
.
delegate
.
Logic_OnMouseUp
(
global_mouseEvent
,
pos
.
X
,
pos
.
Y
,
pos
.
Page
);
AscCommon
.
stopEvent
(
e
);
isCheckContextMenuSelect
=
true
;
break
;
}
case
AscCommon
.
MobileTouchMode
.
TableMove
:
...
...
@@ -649,7 +651,7 @@
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
if
(
true
!==
this
.
iScroll
.
isAnimating
)
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
);
this
.
CheckContextMenuTouchEnd
(
isCheckContextMenuMode
,
isCheckContextMenuSelect
);
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