diff --git a/src/css/pannellum.css b/src/css/pannellum.css index d0b7475..2ff392c 100644 --- a/src/css/pannellum.css +++ b/src/css/pannellum.css @@ -17,7 +17,6 @@ outline: 0; line-height: 1.4; contain: content; - touch-action: none; } .pnlm-container * { diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 8268577..0c7b32a 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -933,6 +933,9 @@ var pointerIDs = [], */ function onDocumentPointerDown(event) { if (event.pointerType == 'touch') { + // Only do something if the panorama is loaded + if (!loaded || !config.draggable) + return; pointerIDs.push(event.pointerId); pointerCoordinates.push({clientX: event.clientX, clientY: event.clientY}); event.targetTouches = pointerCoordinates; @@ -948,6 +951,8 @@ function onDocumentPointerDown(event) { */ function onDocumentPointerMove(event) { if (event.pointerType == 'touch') { + if (!config.draggable) + return; for (var i = 0; i < pointerIDs.length; i++) { if (event.pointerId == pointerIDs[i]) { pointerCoordinates[i].clientX = event.clientX;