Skip to content

Commit

Permalink
Running linters
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPiscitelli committed Mar 7, 2021
1 parent f6d4d8e commit b33885b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 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.

12 changes: 7 additions & 5 deletions glider.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@

_.slides = _.track.children;


[].forEach.call(_.slides, function (_, i) {
_.classList.add('glider-slide')
_.setAttribute('data-gslide', i)
Expand Down Expand Up @@ -324,7 +323,8 @@
}

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

var animate = function () {
var now = new Date().getTime() - start
_.scrollLeft = _.scrollLeft + (scrollTarget - _.scrollLeft) * _.opt.easing(0, now, 0, 1, scrollDuration)
_.scrollLeft =
_.scrollLeft +
(scrollTarget - _.scrollLeft) *
_.opt.easing(0, now, 0, 1, scrollDuration)
_.ele.scrollLeft = _.scrollLeft

if (now < scrollDuration && animateIndex === _.animate_id) {
Expand Down Expand Up @@ -494,8 +497,7 @@
var _ = this
if (_.mouseDown) {
_.isDrag = true
_.scrollLeft +=
(_.mouseDown - e.clientX) * (_.opt.dragVelocity || 3.3)
_.scrollLeft += (_.mouseDown - e.clientX) * (_.opt.dragVelocity || 3.3)
_.mouseDown = e.clientX
_.ele.scrollLeft = _.scrollLeft
}
Expand Down
Loading

0 comments on commit b33885b

Please sign in to comment.