Skip to content

Commit

Permalink
Rounding slide calculation during scroll lock check
Browse files Browse the repository at this point in the history
This fixes issue #48
  • Loading branch information
NickPiscitelli committed Jun 18, 2019
1 parent 6ea8d7c commit 3d4650f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/assets/js/glider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions glider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\___//_//_/ \_,_/ \__//_/ (_)__/ //___/
|___/
Version: 1.6.6
Version: 1.6.7
Author: Nick Piscitelli (pickykneee)
Website: https://nickpiscitelli.com
Documentation: http://nickpiscitelli.github.io/Glider.js
Expand Down Expand Up @@ -314,7 +314,7 @@
clearTimeout(_.scrollLock)
_.scrollLock = setTimeout(function () {
clearTimeout(_.scrollLock)
if ((_.ele.scrollLeft / _.itemWidth) % 1) {
if (Math.round(_.ele.scrollLeft / _.itemWidth) % 1) {
_.scrollItem(_.round(_.ele.scrollLeft / _.itemWidth))
}
}, _.opt.scrollLockDelay || 250)
Expand Down
Loading

0 comments on commit 3d4650f

Please sign in to comment.