Permalink
Browse files

Updated Spacer to include pin element margin.

  • Loading branch information...
1 parent d64eba6 commit 3ecd5aac00df9ca1af4e3df9a22a86f61fd00e34 @janpaepke janpaepke committed Nov 19, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 js/jquery.superscrollorama.js
@@ -211,19 +211,19 @@
// 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
pinObj.spacer.width(0);
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);

0 comments on commit 3ecd5aa

Please sign in to comment.