Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MRBR_video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
MRBR_video
Commits
23ac0969
Commit
23ac0969
authored
Nov 14, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整触摸事件
parent
c62d35dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
myVideoControlScript.js
...R_video/prefab/VideoControlBar/js/myVideoControlScript.js
+8
-11
No files found.
assets/MRBR_video/prefab/VideoControlBar/js/myVideoControlScript.js
View file @
23ac0969
...
@@ -82,28 +82,25 @@ cc.Class({
...
@@ -82,28 +82,25 @@ cc.Class({
this
.
dragBtn
.
off
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
);
this
.
dragBtn
.
off
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
);
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
,
(
e
)
=>
{
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-1
"
);
//
console.log("用户抬手-1");
if
(
this
.
userDragStart
)
{
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
false
;
this
.
userDragStart
=
false
;
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
}
}
});
});
this
.
dragBtn
.
off
(
cc
.
Node
.
EventType
.
MOUSE_UP
);
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
(
e
)
=>
{
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-2
"
);
//
console.log("用户抬手-2");
if
(
this
.
userDragStart
)
{
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
false
;
this
.
userDragStart
=
false
;
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
}
}
});
});
cc
.
find
(
'
Canvas
'
).
on
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-3
"
);
this
.
dragBtn
.
off
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
);
if
(
this
.
userDragStart
)
{
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
(
e
)
=>
{
this
.
userDragStart
=
false
;
// console.log("用户抬手-3");
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
}
});
cc
.
find
(
'
Canvas
'
).
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-4
"
);
if
(
this
.
userDragStart
)
{
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
false
;
this
.
userDragStart
=
false
;
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
this
.
node
.
emit
(
'
on_drag_button
'
,
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