Skip to content

Commit 7d36a32

Browse files
author
Daniel Li
committed
Correctly incorporating lethargy into smartscroll
1 parent 1c71515 commit 7d36a32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

smartscroll.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@
118118
if(!scrolling) {
119119
e.preventDefault()
120120
e.stopPropagation();
121-
if(e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
122-
scrollUp();
123-
}
124-
else {
121+
var validScroll = lethargy.check(e);
122+
if (validScroll === 1) {
123+
scrollUp();
124+
} else if (validScroll === -1) {
125125
scrollDown();
126126
}
127127
}

0 commit comments

Comments
 (0)