Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-13
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
YM4-13
Commits
2e4d7e7a
Commit
2e4d7e7a
authored
Nov 02, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug log
parent
7a0077bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
play.component.ts
src/app/play/play.component.ts
+6
-0
No files found.
src/app/play/play.component.ts
View file @
2e4d7e7a
...
@@ -1285,6 +1285,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1285,6 +1285,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
g_enableMapDown
=
false
;
this
.
g_enableMapDown
=
false
;
if
(
this
.
m_mapDragObject
[
item
.
id
]){
if
(
this
.
m_mapDragObject
[
item
.
id
]){
this
.
m_mapDragObject
[
item
.
id
].
trigger
()
this
.
m_mapDragObject
[
item
.
id
].
trigger
()
console
.
log
(
"
触发拖拽点击事件
"
,
item
.
id
)
let
dragElement
=
this
.
g_cartoon
.
getCartoonElement
(
item
.
id
)
let
dragElement
=
this
.
g_cartoon
.
getCartoonElement
(
item
.
id
)
if
(
dragElement
){
if
(
dragElement
){
this
.
g_currentDragElementID
=
item
.
id
this
.
g_currentDragElementID
=
item
.
id
...
@@ -1588,6 +1589,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1588,6 +1589,7 @@ export class PlayComponent implements OnInit, OnDestroy {
releaseDragElement
(){
releaseDragElement
(){
if
(
this
.
g_currentDragElementID
){
if
(
this
.
g_currentDragElementID
){
console
.
log
(
"
释放拖动
"
,
this
.
g_currentDragElementID
)
this
.
m_mapDragObject
[
this
.
g_currentDragElementID
].
release
()
this
.
m_mapDragObject
[
this
.
g_currentDragElementID
].
release
()
}
}
}
}
...
@@ -1770,11 +1772,15 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1770,11 +1772,15 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
m_moveAsstantIntervalId
=
setInterval
(()
=>
{
this
.
m_moveAsstantIntervalId
=
setInterval
(()
=>
{
if
(
this
.
g_enableDragging
){
if
(
this
.
g_enableDragging
){
callback
()
callback
()
console
.
log
(
"
拖动
"
)
}
else
{
}
else
{
let
moveX
=
Math
.
abs
(
this
.
g_dragFirstClickX
-
this
.
g_clickX
)
let
moveX
=
Math
.
abs
(
this
.
g_dragFirstClickX
-
this
.
g_clickX
)
let
moveY
=
Math
.
abs
(
this
.
g_dragFirstClickY
-
this
.
g_clickY
)
let
moveY
=
Math
.
abs
(
this
.
g_dragFirstClickY
-
this
.
g_clickY
)
if
(
moveX
>
this
.
g_enableDragDistance
||
moveY
>
this
.
g_enableDragDistance
)
{
if
(
moveX
>
this
.
g_enableDragDistance
||
moveY
>
this
.
g_enableDragDistance
)
{
console
.
log
(
"
触发拖动
"
)
this
.
g_enableDragging
=
true
;
this
.
g_enableDragging
=
true
;
}
else
{
console
.
log
(
"
防抖,未触发拖动
"
)
}
}
}
}
},
50
)
},
50
)
...
...
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