Skip to content

Commit

Permalink
update rafLogic for scrollable area (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer authored Feb 25, 2018
1 parent 43a0838 commit 4a11b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/mixins/in-viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default Mixin.create({
this.intersectionObserver = new IntersectionObserver(bind(this, this._onIntersection), options);
this.intersectionObserver.observe(element);
} else {
const height = scrollableArea ? scrollableArea.offsetHeight : window.innerHeight;
const height = scrollableArea ? scrollableArea.offsetHeight + scrollableArea.getBoundingClientRect().top: window.innerHeight;
const width = scrollableArea ? scrollableArea.offsetWidth : window.innerWidth;
const boundingClientRect = element.getBoundingClientRect();

Expand Down

0 comments on commit 4a11b4e

Please sign in to comment.