From 1156d557284a17c730c2a340d78cfc4ed5513396 Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Fri, 31 Oct 2014 16:08:52 +1000 Subject: [PATCH] Made mouseWheelDelay false by default per lukesnowden/FSVS#3 --- README.md | 2 +- fsvs.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e197687..ca95a97 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ $(document).ready( function() { beforeSlide : function(){}, endSlide : function(){}, mouseWheelEvents : true, - mouseWheelDelay : 250, + mouseWheelDelay : false, mouseDragEvents : true, touchEvents : true, arrowKeyEvents : true, diff --git a/fsvs.js b/fsvs.js index c7e5d96..b00053b 100644 --- a/fsvs.js +++ b/fsvs.js @@ -27,7 +27,7 @@ beforeSlide : function(){}, endSlide : function(){}, mouseWheelEvents : true, - mouseWheelDelay : 250, + mouseWheelDelay : false, mouseDragEvents : true, touchEvents : true, arrowKeyEvents : true, @@ -230,7 +230,7 @@ // chrome seems to extends its "wheely" motion wheely = Math.floor( wheely / 5 ); } - if( ( ! scrolling || Date.now() > mouseWheelScrollStart + options.mouseWheelDelay ) && Math.abs( wheely ) > 5 ) { + if( ( ! scrolling || ( options.mouseWheelDelay && Date.now() > mouseWheelScrollStart + options.mouseWheelDelay ) ) && Math.abs( wheely ) > 5 ) { mouseWheelScrollStart = Date.now(); scrolling = true; // Firefox goes backwards... obviously