forked from rebillar/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,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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue