Skip to content

Commit

Permalink
Merge pull request #46 from tyom/fix-last-hidden-slide
Browse files Browse the repository at this point in the history
Fix issue when detecting if slide is visible
  • Loading branch information
NickPiscitelli committed Jun 3, 2019
2 parents c22d1fa + b102ce2 commit 6ea8d7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/assets/js/glider.min.js

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

2 changes: 1 addition & 1 deletion glider.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
}

var isVisible =
Math.ceil(itemStart) >= start && Math.ceil(itemEnd) <= end
Math.ceil(itemStart) >= start && Math.floor(itemEnd) <= end
slideClasses.toggle('visible', isVisible)
if (isVisible !== wasVisible) {
_.emit('slide-' + (isVisible ? 'visible' : 'hidden'), {
Expand Down
Loading

0 comments on commit 6ea8d7c

Please sign in to comment.