From 9d755ff1db021c70092ecc35d0021e32f42dff8b Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Tue, 1 Nov 2022 13:36:36 +0200 Subject: [PATCH] tweak options for footer observer --- explore/src/app/app.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index 8b3323d9..d8b467ae 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -135,6 +135,11 @@ export class AppComponent { } createObservers() { + let options = { + root: null, + rootMargin: '0px', + threshold: 0.1 + }; let intersectionObserver = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.isIntersecting && this.showQuickContact) { @@ -145,7 +150,7 @@ export class AppComponent { this.quickContactService.setDisplay(this.showQuickContact); } }); - }); + }, options); intersectionObserver.observe(this.bottom.nativeElement); this.subscriptions.push(intersectionObserver); }