Trying to fix undefined error on mobile devices while swiping

This commit is contained in:
Tobias Reich 2014-04-01 22:49:51 +02:00
parent cdd5abcdd8
commit edb7471b10
3 changed files with 5 additions and 5 deletions

View File

@ -60,7 +60,8 @@ photo = {
var delay = 0; var delay = 0;
if (album.json&& if (photo.getID()!==false&&
album.json&&
album.json.content[photo.getID()]&& album.json.content[photo.getID()]&&
album.json.content[photo.getID()].previousPhoto!=="") { album.json.content[photo.getID()].previousPhoto!=="") {
@ -89,7 +90,8 @@ photo = {
var delay = 0; var delay = 0;
if (album.json&& if (photo.getID()!==false&&
album.json&&
album.json.content[photo.getID()]&& album.json.content[photo.getID()]&&
album.json.content[photo.getID()].nextPhoto!=="") { album.json.content[photo.getID()].nextPhoto!=="") {

View File

@ -36,8 +36,6 @@ swipe = {
stop: function(e, left, right) { stop: function(e, left, right) {
console.log('stop with ' + e.x);
if (e.x<=-swipe.tolerance) left(true); if (e.x<=-swipe.tolerance) left(true);
else if (e.x>=swipe.tolerance) right(true); else if (e.x>=swipe.tolerance) right(true);
else if (swipe.obj!==null) { else if (swipe.obj!==null) {

File diff suppressed because one or more lines are too long