Page Content: Fix replace header behaviour
This commit is contained in:
parent
00868405c8
commit
7bb2346ec2
|
@ -127,9 +127,11 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
if (this.header) {
|
||||
let headerObs = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
this.layoutService.setReplaceHeader(!entry.isIntersecting);
|
||||
if(entry.boundingClientRect.height > 0) {
|
||||
this.layoutService.setReplaceHeader(!entry.isIntersecting);
|
||||
}
|
||||
})
|
||||
}, {threshold: 0.5});
|
||||
});
|
||||
this.subscriptions.push(headerObs);
|
||||
headerObs.observe(this.header.nativeElement);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue