mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-28 07:20:20 +02:00
@@ -36,6 +36,7 @@ export default class WebSlides {
|
||||
* @param {boolean} loop Whether to go to first slide from last one or not.
|
||||
* @param {number} minWheelDelta Controls the amount of needed scroll to
|
||||
* trigger navigation.
|
||||
* @param {boolean} navigateOnScroll Whether scroll can trigger navigation or not.
|
||||
* @param {number} scrollWait Controls the amount of time to wait till
|
||||
* navigation can occur again with scroll.
|
||||
* @param {number} slideOffset Controls the amount of needed touch delta to
|
||||
@@ -46,6 +47,7 @@ export default class WebSlides {
|
||||
changeOnClick = false,
|
||||
loop = true,
|
||||
minWheelDelta = 40,
|
||||
navigateOnScroll = true,
|
||||
scrollWait = 450,
|
||||
slideOffset = 50
|
||||
} = {}) {
|
||||
|
@@ -40,6 +40,11 @@ export default class Scroll {
|
||||
*/
|
||||
this.timeout_ = null;
|
||||
|
||||
// Disabling from option
|
||||
if (!this.ws_.options.navigateOnScroll) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!MobileDetector.isAny()) {
|
||||
this.scrollContainer_.addEventListener(
|
||||
'wheel', this.onMouseWheel_.bind(this));
|
||||
|
Reference in New Issue
Block a user