Commit 2e4d7e7a authored by 李维's avatar 李维

Add debug log

parent 7a0077bc
......@@ -1285,6 +1285,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.g_enableMapDown = false;
if(this.m_mapDragObject[item.id]){
this.m_mapDragObject[item.id].trigger()
console.log("触发拖拽点击事件", item.id)
let dragElement = this.g_cartoon.getCartoonElement(item.id)
if(dragElement){
this.g_currentDragElementID = item.id
......@@ -1588,6 +1589,7 @@ export class PlayComponent implements OnInit, OnDestroy {
releaseDragElement(){
if(this.g_currentDragElementID){
console.log("释放拖动", this.g_currentDragElementID)
this.m_mapDragObject[this.g_currentDragElementID].release()
}
}
......@@ -1770,11 +1772,15 @@ export class PlayComponent implements OnInit, OnDestroy {
this.m_moveAsstantIntervalId = setInterval(() => {
if(this.g_enableDragging){
callback()
console.log("拖动")
}else{
let moveX = Math.abs(this.g_dragFirstClickX - this.g_clickX)
let moveY = Math.abs(this.g_dragFirstClickY - this.g_clickY)
if (moveX > this.g_enableDragDistance || moveY > this.g_enableDragDistance) {
console.log("触发拖动")
this.g_enableDragging = true;
} else {
console.log("防抖,未触发拖动")
}
}
}, 50)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment