Skip to content

Commit

Permalink
refactor IntersectionObserver to observe viewport in single-column mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
panarom authored and Gargron committed Dec 31, 2019
1 parent 3b3bdc7 commit 2a5da8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/javascript/mastodon/components/scrollable_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,13 @@ export default class ScrollableList extends PureComponent {
}

attachIntersectionObserver () {
this.intersectionObserverWrapper.connect({
let nodeOptions = {
root: this.node,
rootMargin: '300% 0px',
});
};

this.intersectionObserverWrapper
.connect(this.props.bindToDocument ? {} : nodeOptions);
}

detachIntersectionObserver () {
Expand Down

0 comments on commit 2a5da8c

Please sign in to comment.