Skip to content

Commit

Permalink
fix(scroller): count container top and bottom offset
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Jul 25, 2013
1 parent d20f856 commit f8b7179
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ angular.module('ajoslin.scrolly.scroller', [
var offBottom = parseInt(style['margin-bottom'], 10) +
parseInt(style['padding-bottom'], 10);
var height = parseInt(style.height, 10);
var top = parseInt(style.top, 10);
var bottom = parseInt(style.bottom, 10);
return {
top: offTop,
bottom: offBottom,
top: offTop + (isNaN(top) ? 0 : top),
bottom: offBottom + (isNaN(bottom) ? 0 : bottom),
height: height
};
}
Expand Down

0 comments on commit f8b7179

Please sign in to comment.