More selective scroll detection
This commit is contained in:
parent
d08f76ec99
commit
cdbcc51927
@ -532,9 +532,9 @@
|
||||
);
|
||||
},
|
||||
mounted() {
|
||||
this.observer_scroller = new IntersectionObserver(() => { if((this.date_next) && (!this.query.replace(/^\s+|\s+$/g, '')) && (this.selection)) this.date_begin = this.date_next; }, { root: this.$refs.scroller, rootMargin: '25%' });
|
||||
this.observer_scroller = new IntersectionObserver(([entry]) => { if((entry.isIntersecting) && (this.selection) && (this.date_next) && (!this.is_loading) && (!this.query.replace(/^\s+|\s+$/g, ''))) this.date_begin = this.date_next; }, { root: this.$refs.scroller, rootMargin: '25%' });
|
||||
this.observer_scroller.observe(this.$refs.bottom);
|
||||
this.observer_viewport = new IntersectionObserver(() => { if((this.date_next) && (!this.query.replace(/^\s+|\s+$/g, '')) && (!this.selection)) this.date_begin = this.date_next; }, { rootMargin: '25%' });
|
||||
this.observer_viewport = new IntersectionObserver(([entry]) => { if((entry.isIntersecting) && (!this.selection) && (this.date_next) && (!this.is_loading) && (!this.query.replace(/^\s+|\s+$/g, ''))) this.date_begin = this.date_next; }, { rootMargin: '25%' });
|
||||
this.observer_viewport.observe(this.$refs.bottom);
|
||||
},
|
||||
destroyed() {
|
||||
|
Loading…
Reference in New Issue
Block a user