diff --git a/src/ng2fittext.directive.ts b/src/ng2fittext.directive.ts index 46bfb81..54958f7 100644 --- a/src/ng2fittext.directive.ts +++ b/src/ng2fittext.directive.ts @@ -49,8 +49,11 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit { ngOnInit() { if (this.fittext) { - this.setFontSize(this.container.clientWidth); - this.el.nativeElement.style.setProperty('will-change', 'content'); + if(this.activateOnInputEvents) { + this.setFontSize(this.container.clientHeight); + } else { + this.setFontSize(this.container.clientWidth); + this.el.nativeElement.style.setProperty('will-change', 'content'); } }