Skip to content

Commit

Permalink
Removes trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbadia committed Nov 21, 2018
1 parent 89fbe61 commit 1bf6cdc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scroll-fixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$(window).on('resize', function(e) { data.scheduleUpdate(); });

data.didScroll(true);
}
}
else {
data.didScroll();
}
Expand Down Expand Up @@ -78,7 +78,7 @@
Note that if two elements are stick together, the box shadow will
only be apply to the last element.
@type String
@default: '0 2px 10px rgba(0,0,0,0.25)'
@since Version 1.0
Expand Down Expand Up @@ -157,8 +157,8 @@
// Ignore if the user scroll overflow the page
if (scrollTop < 0 || scrollTop > $document.height()) return;

if (scrollTop > 0 &&
scrollTop + this.fixedElementsHeight(this) >= this._placeholder.offset().top &&
if (scrollTop > 0 &&
scrollTop + this.fixedElementsHeight(this) >= this._placeholder.offset().top &&
this.options.canFix.call(this)
) {
this.fixElement(firstTime);
Expand All @@ -173,7 +173,7 @@
*/
fixElement: function(firstTime) {
var $element = this.$element,
options = this.options,
options = this.options,
fixedElements = this.fixedElements,
fixedElementsHeight = this.fixedElementsHeight(this),
scrollTop = $(window).scrollTop();
Expand Down Expand Up @@ -236,7 +236,7 @@
/**
Compute the height of the fixed elements before the one
passed in argument
@returns {Number}
*/
fixedElementsHeight: function() {
Expand Down Expand Up @@ -290,7 +290,7 @@

/**
Return true if the element is visible on screen
@param jQuery element
@returns {Boolean}
*/
Expand All @@ -310,7 +310,7 @@
Schedule an update.
*/
scheduleUpdate: function() {
if (this._didScheduleUpdate) return;
if (this._didScheduleUpdate) return;

if (window.requestAnimationFrame) {
var that = this;
Expand Down

0 comments on commit 1bf6cdc

Please sign in to comment.