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,10 +204,12 @@ manager.add(Swipe);
// Subscribe to the swipe event
manager.on('swipe', function(e) {
var direction = e.offsetDirection;
if (direction === 4) { // right
displayNext(-1);
} else if (direction === 2) { // left
displayNext(1);
if (isMobile){
if (direction === 4) { // right
displayNext(-1);
} else if (direction === 2) { // left
displayNext(1);
}
}
});