mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 00:38:07 +01:00
refactor IntersectionObserver to observe viewport in single-column mode (#12735)
This commit is contained in:
parent
3b3bdc7293
commit
2a5da8c961
1 changed files with 5 additions and 2 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue