Fixed an error when swiping and removed unnecessary detection
This commit is contained in:
parent
a92a8e5e42
commit
605ef84c0b
@ -127,9 +127,9 @@ $(document).ready(function(){
|
||||
})
|
||||
|
||||
/* Swipe on mobile */
|
||||
.swipe().on('swipeStart', function() { swipe.start($("#image")) })
|
||||
.swipe().on('swipeMove', function(e) { swipe.move(e.swipe) })
|
||||
.swipe().on('swipeEnd', function(e) { swipe.stop(e.swipe, photo.previous, photo.next) });
|
||||
.swipe().on('swipeStart', function() { if (visible.photo()) swipe.start($("#image")) })
|
||||
.swipe().on('swipeMove', function(e) { if (visible.photo()) swipe.move(e.swipe) })
|
||||
.swipe().on('swipeEnd', function(e) { if (visible.photo()) swipe.stop(e.swipe, photo.previous, photo.next) });
|
||||
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@ swipe = {
|
||||
|
||||
console.log(e);
|
||||
|
||||
if (swipe.obj===null) return false;
|
||||
|
||||
swipe.offset = -1 * e.x;
|
||||
|
||||
swipe.obj.css({
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user