Skip to content

Commit 5034082

Browse files
committed
vswipe
1 parent 05214c7 commit 5034082

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/jquery.swipebox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@
389389

390390

391391
if ( vSwipe ) {
392+
vSwipe = false;
392393
if ( Math.abs( vDistance ) >= 2*vSwipMinDistance && Math.abs(vDistance) > Math.abs(vDistanceLast)) {
393394
var vOffset = vDistance > 0 ? slider.height() : - slider.height();
394395
slider.animate( { top: vOffset + 'px', 'opacity': 0 },
@@ -400,17 +401,16 @@
400401
slider.animate( { top: 0, 'opacity': 1 }, 300 );
401402
}
402403

403-
vSwipe = false;
404404
return;
405405
} else if ( hSwipe ) {
406+
hSwipe = false;
406407
if( hDistance >= hSwipMinDistance && hDistance >= hDistanceLast) {
407408
// swipeLeft
408409
$this.getPrev();
409410
} else if ( hDistance <= -hSwipMinDistance && hDistance <= hDistanceLast) {
410411
// swipeRight
411412
$this.getNext();
412413
}
413-
hSwipe = false;
414414
} else {
415415
// tap
416416
if ( ! bars.hasClass( 'visible-bars' ) ) {

0 commit comments

Comments
 (0)