@shapediver/viewer.shared.services
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -111,3 +111,3 @@ "use strict"; | ||
if (allowedListeners.touchstart) { | ||
window.addEventListener("touchstart", this._onTouchStart); | ||
window.addEventListener("touchstart", this._onTouchStart, { passive: false }); | ||
} | ||
@@ -121,3 +121,3 @@ else { | ||
if (allowedListeners.touchmove) { | ||
window.addEventListener("touchmove", this._onTouchMove); | ||
window.addEventListener("touchmove", this._onTouchMove, { passive: false }); | ||
} | ||
@@ -131,3 +131,3 @@ else { | ||
if (allowedListeners.touchend) { | ||
window.addEventListener("touchend", this._onTouchUp); | ||
window.addEventListener("touchend", this._onTouchUp, { passive: false }); | ||
} | ||
@@ -141,3 +141,3 @@ else { | ||
if (allowedListeners.touchcancel) { | ||
window.addEventListener("touchcancel", this._onTouchCancel); | ||
window.addEventListener("touchcancel", this._onTouchCancel, { passive: false }); | ||
} | ||
@@ -191,6 +191,6 @@ else { | ||
this._canvas.addEventListener("mouseout", this._onMouseOut); | ||
window.addEventListener("touchstart", this._onTouchStart); | ||
window.addEventListener("touchmove", this._onTouchMove); | ||
window.addEventListener("touchend", this._onTouchUp); | ||
window.addEventListener("touchcancel", this._onTouchCancel); | ||
window.addEventListener("touchstart", this._onTouchStart, { passive: false }); | ||
window.addEventListener("touchmove", this._onTouchMove, { passive: false }); | ||
window.addEventListener("touchend", this._onTouchUp, { passive: false }); | ||
window.addEventListener("touchcancel", this._onTouchCancel, { passive: false }); | ||
window.addEventListener("keydown", this._onKeyDown); | ||
@@ -235,3 +235,3 @@ window.addEventListener("mousemove", this._onKeyDownMousePositionHelper); | ||
onTouchUp(event) { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement)) { | ||
event.preventDefault(); | ||
@@ -244,3 +244,3 @@ event.stopPropagation(); | ||
onTouchCancel(event) { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement)) { | ||
event.preventDefault(); | ||
@@ -253,3 +253,3 @@ event.stopPropagation(); | ||
onTouchMove(event) { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement)) { | ||
event.preventDefault(); | ||
@@ -261,3 +261,3 @@ event.stopPropagation(); | ||
onTouchStart(event) { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement)) { | ||
event.preventDefault(); | ||
@@ -264,0 +264,0 @@ event.stopPropagation(); |
{ | ||
"name": "@shapediver/viewer.shared.services", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "", | ||
@@ -47,3 +47,3 @@ "keywords": [], | ||
"@shapediver/viewer.settings": "0.1.36", | ||
"@shapediver/viewer.shared.build-data": "2.3.1", | ||
"@shapediver/viewer.shared.build-data": "2.3.2", | ||
"@types/dompurify": "^2.3.1", | ||
@@ -59,3 +59,3 @@ "@types/ua-parser-js": "^0.7.36", | ||
}, | ||
"gitHead": "620b0b38ad947dbfd6778ed368371da14d2b4451" | ||
"gitHead": "d7c9ae738a064c899ffb121e306cd8c1d0c7d922" | ||
} |
@@ -148,3 +148,3 @@ import { container } from 'tsyringe' | ||
if (allowedListeners.touchstart) { | ||
window.addEventListener("touchstart", this._onTouchStart); | ||
window.addEventListener("touchstart", this._onTouchStart, { passive: false }); | ||
} else { | ||
@@ -158,3 +158,3 @@ window.removeEventListener("touchstart", this._onTouchStart); | ||
if (allowedListeners.touchmove) { | ||
window.addEventListener("touchmove", this._onTouchMove); | ||
window.addEventListener("touchmove", this._onTouchMove, { passive: false }); | ||
} else { | ||
@@ -168,3 +168,3 @@ window.removeEventListener("touchmove", this._onTouchMove); | ||
if (allowedListeners.touchend) { | ||
window.addEventListener("touchend", this._onTouchUp); | ||
window.addEventListener("touchend", this._onTouchUp, { passive: false }); | ||
} else { | ||
@@ -178,3 +178,3 @@ window.removeEventListener("touchend", this._onTouchUp); | ||
if (allowedListeners.touchcancel) { | ||
window.addEventListener("touchcancel", this._onTouchCancel); | ||
window.addEventListener("touchcancel", this._onTouchCancel, { passive: false }); | ||
} else { | ||
@@ -235,6 +235,6 @@ window.removeEventListener("touchcancel", this._onTouchCancel); | ||
window.addEventListener("touchstart", this._onTouchStart); | ||
window.addEventListener("touchmove", this._onTouchMove); | ||
window.addEventListener("touchend", this._onTouchUp); | ||
window.addEventListener("touchcancel", this._onTouchCancel); | ||
window.addEventListener("touchstart", this._onTouchStart, { passive: false }); | ||
window.addEventListener("touchmove", this._onTouchMove, { passive: false }); | ||
window.addEventListener("touchend", this._onTouchUp, { passive: false }); | ||
window.addEventListener("touchcancel", this._onTouchCancel, { passive: false }); | ||
@@ -290,3 +290,3 @@ window.addEventListener("keydown", this._onKeyDown); | ||
private onTouchUp(event: TouchEvent): void { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement!)) { | ||
event.preventDefault(); | ||
@@ -300,3 +300,3 @@ event.stopPropagation(); | ||
private onTouchCancel(event: TouchEvent): void { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement!)) { | ||
event.preventDefault(); | ||
@@ -310,3 +310,3 @@ event.stopPropagation(); | ||
private onTouchMove(event: TouchEvent): void { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement!)) { | ||
event.preventDefault(); | ||
@@ -319,3 +319,3 @@ event.stopPropagation(); | ||
private onTouchStart(event: TouchEvent): void { | ||
if (event.composedPath().includes(this._canvas)) { | ||
if (event.composedPath().includes(this._canvas.parentElement!)) { | ||
event.preventDefault(); | ||
@@ -322,0 +322,0 @@ event.stopPropagation(); |
Sorry, the diff of this file is not supported yet
305882
+ Added@shapediver/viewer.shared.build-data@2.3.2(transitive)
- Removed@shapediver/viewer.shared.build-data@2.3.1(transitive)