Przeglądaj źródła

refactor IntersectionObserver to observe viewport in single-column mode (#12735)

master^2
Matt Panaro 4 lat temu
committed by Eugen Rochko
rodzic
commit
2a5da8c961
1 zmienionych plików z 5 dodań i 2 usunięć
  1. +5
    -2
      app/javascript/mastodon/components/scrollable_list.js

+ 5
- 2
app/javascript/mastodon/components/scrollable_list.js Wyświetl plik

@@ -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 () {


Ładowanie…
Anuluj
Zapisz