Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Osterhout committed Jul 8, 2015
1 parent d82f83c commit 20bb94e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/plugin/handler/native-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function bindNativeScrollHandler(element, i) {
});

if (i.settings.fixedScrollX) {
window.addEventListener("scroll", function() {
window.addEventListener("scroll", function () {
updateCssBottom(element, i);
});
}
Expand Down
5 changes: 3 additions & 2 deletions src/js/plugin/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var cls = require('../lib/class')
, h = require('../lib/helper')
, instances = require('./instances')
, updateGeometry = require('./update-geometry')
, updateCssBottom = require('./update-css-bottom');;
, updateCssBottom = require('./update-css-bottom');

// Handlers
var clickRailHandler = require('./handler/click-rail')
Expand Down Expand Up @@ -42,6 +42,7 @@ module.exports = function (element, userSettings) {
}

updateGeometry(element);
if (i.settings.fixedScrollX)
if (i.settings.fixedScrollX) {
updateCssBottom(element, i);
}
};
3 changes: 2 additions & 1 deletion src/js/plugin/update-css-bottom.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ module.exports = function (element, i) {
var elementBottom = (element.getBoundingClientRect().top + document.body.scrollTop) + element.offsetHeight;

// if user has not scrolled beyond the element
if (scrolled < elementBottom) // position xRail to the bottom of the element
if (scrolled < elementBottom) { // position xRail to the bottom of the element
xRailOffset.bottom = (Math.abs(scrolled - elementBottom));
}

d.css(i.scrollbarXRail, xRailOffset);
};

0 comments on commit 20bb94e

Please sign in to comment.