forked from vergnet/site-accueil-insa
Prevent swipe on images on desktop
This commit is contained in:
parent
f5824375fa
commit
38d64ea4a1
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue