Prevent swipe on images on desktop

This commit is contained in:
Keplyx 2018-10-04 14:10:23 +02:00
parent f5824375fa
commit 38d64ea4a1

View file

@ -204,11 +204,13 @@ manager.add(Swipe);
// Subscribe to the swipe event // Subscribe to the swipe event
manager.on('swipe', function(e) { manager.on('swipe', function(e) {
var direction = e.offsetDirection; var direction = e.offsetDirection;
if (isMobile){
if (direction === 4) { // right if (direction === 4) { // right
displayNext(-1); displayNext(-1);
} else if (direction === 2) { // left } else if (direction === 2) { // left
displayNext(1); displayNext(1);
} }
}
}); });