Skip to content

Commit

Permalink
Made mouseWheelDelay false by default per #3
Browse files Browse the repository at this point in the history
  • Loading branch information
roganartu committed Oct 31, 2014
1 parent f29b359 commit 1156d55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(document).ready( function() {
beforeSlide : function(){},
endSlide : function(){},
mouseWheelEvents : true,
mouseWheelDelay : 250,
mouseWheelDelay : false,
mouseDragEvents : true,
touchEvents : true,
arrowKeyEvents : true,
Expand Down
4 changes: 2 additions & 2 deletions fsvs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
beforeSlide : function(){},
endSlide : function(){},
mouseWheelEvents : true,
mouseWheelDelay : 250,
mouseWheelDelay : false,
mouseDragEvents : true,
touchEvents : true,
arrowKeyEvents : true,
Expand Down Expand Up @@ -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
Expand Down

2 comments on commit 1156d55

@ItsJoeTurner
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Seems to work in Safari but not Chrome. Any ideas?

@roganartu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None sorry. fwiw I would've done and tested this entirely in Chrome (albeit 2 years ago) so it may not be specifically a browser issue.

Please sign in to comment.