Skip to content

Commit

Permalink
Version 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyHeleine committed Jun 30, 2014
1 parent 4940227 commit 720731f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions photo-sphere-viewer.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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));
}
}

/**
Expand Down Expand Up @@ -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));
}
}

/**
Expand Down

0 comments on commit 720731f

Please sign in to comment.