From 720731fed02595c0f1704504a1351a4fbbf548bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Heleine?= Date: Mon, 30 Jun 2014 14:53:55 +0200 Subject: [PATCH] Version 1.2.1 --- photo-sphere-viewer.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/photo-sphere-viewer.js b/photo-sphere-viewer.js index 702cb3855..bb921385d 100644 --- a/photo-sphere-viewer.js +++ b/photo-sphere-viewer.js @@ -1,5 +1,5 @@ /* - * Photo Sphere Viewer v1.2 + * Photo Sphere Viewer v1.2.1 * http://jeremyheleine.com/#photo-sphere-viewer * * Copyright (c) 2014 Jeremy Heleine @@ -295,9 +295,11 @@ var PhotoSphereViewer = function(args) { * @return (void) **/ var onTouchStart = function(evt) { - evt.preventDefault(); var touch = evt.changedTouches[0]; - startMove(parseInt(touch.clientX), parseInt(touch.clientY)); + if (touch.target.parentNode == m_container) { + evt.preventDefault(); + startMove(parseInt(touch.clientX), parseInt(touch.clientY)); + } } /** @@ -340,9 +342,11 @@ var PhotoSphereViewer = function(args) { * @return (void) **/ var onTouchMove = function(evt) { - evt.preventDefault(); var touch = evt.changedTouches[0]; - move(parseInt(touch.clientX), parseInt(touch.clientY)); + if (touch.target.parentNode == m_container) { + evt.preventDefault(); + move(parseInt(touch.clientX), parseInt(touch.clientY)); + } } /**