From f5faa6da5e9a1491811ef842bfa3132a80710a53 Mon Sep 17 00:00:00 2001 From: Uwe Oestermeier Date: Fri, 24 May 2019 11:00:29 +0200 Subject: [PATCH] Disabled cancelOnWindowOut because it posed problems on Safari Technology Preview --- dist/iwmlib.js | 15 ++++++++------- dist/iwmlib.pixi.js | 15 ++++++++------- lib/interaction.js | 15 ++++++++------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index e5de4dd..02163b1 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -1917,7 +1917,7 @@ registerTap(key, point) { if (this.tapCounts.has(key)) { let count = this.tapCounts.get(key); - this.tapCounts.set(key, count+1); + this.tapCounts.set(key, count + 1); } else { this.tapCounts.set(key, 1); @@ -1967,7 +1967,7 @@ } let result = false; if (this.isTap(key)) { - + this.registerTap(key, ended); result = this.tapCounts.get(key) == 2; } @@ -2108,7 +2108,7 @@ element.addEventListener( 'pointerup', e => { - if (this.debug) console.log('pointerup'); + if (this.debug) console.log('pointerup', e.pointerId, e.pointerType); this.onEnd(e); if (this.capturePointerEvents) { try { @@ -2121,7 +2121,7 @@ element.addEventListener( 'pointercancel', e => { - if (this.debug) console.log('pointercancel'); + if (this.debug) console.log('pointercancel', e.pointerId, e.pointerType); this.onEnd(e); if (this.capturePointerEvents) element.releasePointerCapture(e.pointerId); @@ -2133,7 +2133,7 @@ element.addEventListener( 'pointerleave', e => { - if (this.debug) console.log('pointerleave'); + if (this.debug) console.log('pointerleave', e.pointerId, e.pointerType); if (e.target == element) this.onEnd(e); }, useCapture @@ -2144,7 +2144,7 @@ element.addEventListener( 'pointerout', e => { - if (this.debug) console.log('pointerout'); + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType); if (e.target == element) this.onEnd(e); }, useCapture @@ -2155,8 +2155,9 @@ window.addEventListener( 'pointerout', e => { + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType, e.target); if (e.target == element) { - this.onEnd(e); + this.onEnd(e); } }, useCapture); diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index b157618..9379969 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -5081,7 +5081,7 @@ registerTap(key, point) { if (this.tapCounts.has(key)) { let count = this.tapCounts.get(key); - this.tapCounts.set(key, count+1); + this.tapCounts.set(key, count + 1); } else { this.tapCounts.set(key, 1); @@ -5131,7 +5131,7 @@ } let result = false; if (this.isTap(key)) { - + this.registerTap(key, ended); result = this.tapCounts.get(key) == 2; } @@ -5272,7 +5272,7 @@ element.addEventListener( 'pointerup', e => { - if (this.debug) console.log('pointerup'); + if (this.debug) console.log('pointerup', e.pointerId, e.pointerType); this.onEnd(e); if (this.capturePointerEvents) { try { @@ -5285,7 +5285,7 @@ element.addEventListener( 'pointercancel', e => { - if (this.debug) console.log('pointercancel'); + if (this.debug) console.log('pointercancel', e.pointerId, e.pointerType); this.onEnd(e); if (this.capturePointerEvents) element.releasePointerCapture(e.pointerId); @@ -5297,7 +5297,7 @@ element.addEventListener( 'pointerleave', e => { - if (this.debug) console.log('pointerleave'); + if (this.debug) console.log('pointerleave', e.pointerId, e.pointerType); if (e.target == element) this.onEnd(e); }, useCapture @@ -5308,7 +5308,7 @@ element.addEventListener( 'pointerout', e => { - if (this.debug) console.log('pointerout'); + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType); if (e.target == element) this.onEnd(e); }, useCapture @@ -5319,8 +5319,9 @@ window.addEventListener( 'pointerout', e => { + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType, e.target); if (e.target == element) { - this.onEnd(e); + this.onEnd(e); } }, useCapture); diff --git a/lib/interaction.js b/lib/interaction.js index ca13508..38d83cf 100755 --- a/lib/interaction.js +++ b/lib/interaction.js @@ -363,7 +363,7 @@ export class Interaction extends InteractionPoints { registerTap(key, point) { if (this.tapCounts.has(key)) { let count = this.tapCounts.get(key) - this.tapCounts.set(key, count+1) + this.tapCounts.set(key, count + 1) } else { this.tapCounts.set(key, 1) @@ -413,7 +413,7 @@ export class Interaction extends InteractionPoints { } let result = false if (this.isTap(key)) { - + this.registerTap(key, ended) result = this.tapCounts.get(key) == 2 } @@ -554,7 +554,7 @@ export class InteractionDelegate { element.addEventListener( 'pointerup', e => { - if (this.debug) console.log('pointerup') + if (this.debug) console.log('pointerup', e.pointerId, e.pointerType) this.onEnd(e) if (this.capturePointerEvents) { try { @@ -567,7 +567,7 @@ export class InteractionDelegate { element.addEventListener( 'pointercancel', e => { - if (this.debug) console.log('pointercancel') + if (this.debug) console.log('pointercancel', e.pointerId, e.pointerType) this.onEnd(e) if (this.capturePointerEvents) element.releasePointerCapture(e.pointerId) @@ -579,7 +579,7 @@ export class InteractionDelegate { element.addEventListener( 'pointerleave', e => { - if (this.debug) console.log('pointerleave') + if (this.debug) console.log('pointerleave', e.pointerId, e.pointerType) if (e.target == element) this.onEnd(e) }, useCapture @@ -590,7 +590,7 @@ export class InteractionDelegate { element.addEventListener( 'pointerout', e => { - if (this.debug) console.log('pointerout') + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType) if (e.target == element) this.onEnd(e) }, useCapture @@ -601,8 +601,9 @@ export class InteractionDelegate { window.addEventListener( 'pointerout', e => { + if (this.debug) console.log('pointerout', e.pointerId, e.pointerType, e.target) if (e.target == element) { - this.onEnd(e) + this.onEnd(e) } }, useCapture)