Fix AOT issue #22

Merged
davidstellini merged 1 commit from patch-1 into master 2019-10-10 19:52:13 +00:00
Showing only changes of commit 68a6a1b4ec - Show all commits

View file

@ -57,7 +57,7 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af
} }
@HostListener('window:resize', ['$event']) @HostListener('window:resize', ['$event'])
onResize() { onResize(event: Event) {
this.done = false; this.done = false;
if (this.activateOnResize && this.fittext) { if (this.activateOnResize && this.fittext) {
if (this.activateOnInputEvents && this.fittext) { if (this.activateOnInputEvents && this.fittext) {
@ -71,7 +71,7 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af
} }
@HostListener('input', ['$event']) @HostListener('input', ['$event'])
onInputEvents() { onInputEvents(event: Event) {
this.done = false; this.done = false;
if (this.activateOnInputEvents && this.fittext) { if (this.activateOnInputEvents && this.fittext) {
this.setFontSize(this.getStartFontSizeFromHeight()); this.setFontSize(this.getStartFontSizeFromHeight());