tweak options for footer observer
This commit is contained in:
parent
ab302e040f
commit
9d755ff1db
|
@ -135,6 +135,11 @@ export class AppComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
createObservers() {
|
createObservers() {
|
||||||
|
let options = {
|
||||||
|
root: null,
|
||||||
|
rootMargin: '0px',
|
||||||
|
threshold: 0.1
|
||||||
|
};
|
||||||
let intersectionObserver = new IntersectionObserver(entries => {
|
let intersectionObserver = new IntersectionObserver(entries => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if (entry.isIntersecting && this.showQuickContact) {
|
if (entry.isIntersecting && this.showQuickContact) {
|
||||||
|
@ -145,7 +150,7 @@ export class AppComponent {
|
||||||
this.quickContactService.setDisplay(this.showQuickContact);
|
this.quickContactService.setDisplay(this.showQuickContact);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}, options);
|
||||||
intersectionObserver.observe(this.bottom.nativeElement);
|
intersectionObserver.observe(this.bottom.nativeElement);
|
||||||
this.subscriptions.push(intersectionObserver);
|
this.subscriptions.push(intersectionObserver);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue