Skip to content

Commit ad68d2b

Browse files
committed
Fix screen refresh issue.
1 parent 1594b06 commit ad68d2b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/app/app.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, HostListener, OnDestroy, OnInit } from '@angular/core';
1+
import { AfterViewInit, Component, HostListener, OnDestroy } from '@angular/core';
22
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
33
import { Router } from '@angular/router';
44
import { AstroEvent, EventFinder, FIRST_QUARTER, FULL_MOON, LAST_QUARTER, NEW_MOON } from '@tubular/astronomy';
@@ -27,7 +27,7 @@ const MAX_CLOCK_EFFECTIVE_WIDTH = 600;
2727
styleUrls: ['./app.component.scss'],
2828
providers: [AppService, MessageService]
2929
})
30-
export class AppComponent implements OnInit, OnDestroy {
30+
export class AppComponent implements AfterViewInit, OnDestroy {
3131
SVC_MIN_YEAR = SVC_MIN_YEAR.toString();
3232
SVC_MAX_YEAR = SVC_MAX_YEAR.toString();
3333

@@ -95,7 +95,7 @@ export class AppComponent implements OnInit, OnDestroy {
9595
app.getCurrentTabUpdates(tabIndex => this.selectedTab = tabIndex);
9696
}
9797

98-
ngOnInit(): void {
98+
ngAfterViewInit(): void {
9999
setTimeout(() => {
100100
this.doResize();
101101

0 commit comments

Comments
 (0)