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
You need to sign in or sign up before continuing.
Commit
23ac0969
authored
Nov 14, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整触摸事件
parent
c62d35dd
Changes
1
Hide 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,33 +82,30 @@ cc.Class({
this
.
dragBtn
.
off
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
);
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_ENDED
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-1
"
);
//
console.log("用户抬手-1");
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
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
)
=>
{
console
.
log
(
"
用户抬手-2
"
);
//
console.log("用户抬手-2");
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
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
);
this
.
dragBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
(
e
)
=>
{
// console.log("用户抬手-3");
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
false
;
this
.
node
.
emit
(
'
on_drag_button
'
,
false
);
}
});
cc
.
find
(
'
Canvas
'
).
on
(
cc
.
Node
.
EventType
.
MOUSE_UP
,
(
e
)
=>
{
console
.
log
(
"
用户抬手-4
"
);
if
(
this
.
userDragStart
)
{
this
.
userDragStart
=
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