Commit 73bda07a authored by 李维's avatar 李维

Add degug log

parent 99310336
...@@ -87,6 +87,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -87,6 +87,7 @@ export class PlayComponent implements OnInit, OnDestroy {
g_firstTouch = true; g_firstTouch = true;
g_partTitle_x = null; g_partTitle_x = null;
g_mainTitle_x = null; g_mainTitle_x = null;
g_dragDelay = 300 //放置拖拽事件触发播放音效
// ------------------------------------ // ------------------------------------
// ------------ 私有数据 ------------ // ------------ 私有数据 ------------
...@@ -535,13 +536,16 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -535,13 +536,16 @@ export class PlayComponent implements OnInit, OnDestroy {
element.timeoutID = null element.timeoutID = null
this.subscribeMapDragEvent(element.id, ()=>{ this.subscribeMapDragEvent(element.id, ()=>{
console.log(element.id, "触发点击")
element.timeoutID = setTimeout(() => { element.timeoutID = setTimeout(() => {
if(item.media.audio_url) { if(item.media.audio_url) {
console.log(element.id, "触发播放音频")
this.g_cartoon.stopAllAudio() this.g_cartoon.stopAllAudio()
this.g_cartoon.playAudio(item.media.audio_url) this.g_cartoon.playAudio(item.media.audio_url)
} }
}, 500); }, this.g_dragDelay);
}, ()=>{ }, ()=>{
console.log(element.id, "触发拖动")
if(element.timeoutID) { if(element.timeoutID) {
clearTimeout(element.timeoutID) clearTimeout(element.timeoutID)
element.timeoutID = null element.timeoutID = null
...@@ -549,6 +553,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -549,6 +553,7 @@ export class PlayComponent implements OnInit, OnDestroy {
elementDrag.ref.x = this.g_clickX, elementDrag.ref.x = this.g_clickX,
elementDrag.ref.y = this.g_clickY elementDrag.ref.y = this.g_clickY
}, ()=>{ }, ()=>{
console.log(element.id, "触发释放")
elementDrag.ref.x = elementDrag.initX, elementDrag.ref.x = elementDrag.initX,
elementDrag.ref.y = elementDrag.initY elementDrag.ref.y = elementDrag.initY
this.m_elementDraged = element.id; this.m_elementDraged = element.id;
......
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