bugfixing

This commit is contained in:
2020-06-14 15:46:24 +02:00
parent 1e1e127f13
commit 19b28453d3
36 changed files with 175 additions and 97 deletions

View File

@@ -10,19 +10,21 @@ import {PerfectScrollbarComponent} from 'ngx-perfect-scrollbar';
animations: [fader]
})
export class AppComponent implements OnInit {
public static hideLoader = () => document.querySelector('#load-bg').classList.add('hidden');
@ViewChild('scrollbar', {static: false}) scrollbar: PerfectScrollbarComponent;
constructor(private scrollService: ScrollService) {
scrollService.restoreScrollPosition$.subscribe(pos => {
if (this.scrollbar && pos) {
//this.scrollbar.scrollTo(pos, 0);
this.scrollbar.directiveRef.scrollTo(0, pos, 300)
// this.scrollbar.scrollTo(pos, 0);
this.scrollbar.directiveRef.scrollTo(0, pos, 300);
// debugger;
}
})
});
}
public static hideLoader = () => document.querySelector('#load-bg').classList.add('hidden');
public ngOnInit(): void {
setTimeout(() => AppComponent.hideLoader(), 800);