Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated Spacer to include pin element margin.

  • Loading branch information...
commit 3ecd5aac00df9ca1af4e3df9a22a86f61fd00e34 1 parent d64eba6
@janpaepke janpaepke authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 js/jquery.superscrollorama.js
View
10 js/jquery.superscrollorama.js
@@ -211,9 +211,9 @@
// If we want to push down following Items we need a spacer to do it, while and after our element is fixed.
if (pinObj.pushFollowers) {
if (superscrollorama.settings.isVertical) {
- pinObj.spacer.height(pinObj.dur + el.outerHeight());
+ pinObj.spacer.height(pinObj.dur + el.outerHeight(true));
} else {
- pinObj.spacer.width(pinObj.dur + el.outerWidth());
+ pinObj.spacer.width(pinObj.dur + el.outerWidth(true));
}
} else {
if (pinObj.origPositioning.pos === "absolute") { // no spacer
@@ -221,9 +221,9 @@
pinObj.spacer.height(0);
} else { // spacer needs to reserve the elements space, while pinned
if (superscrollorama.settings.isVertical) {
- pinObj.spacer.height(el.outerHeight());
+ pinObj.spacer.height(el.outerHeight(true));
} else {
- pinObj.spacer.width(el.outerWidth());
+ pinObj.spacer.width(el.outerWidth(true));
}
}
}
@@ -467,4 +467,4 @@
return superscrollorama;
};
-})(jQuery);
+})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.