quick fix activateOnInputevent

This commit is contained in:
Lorenzo Iovino 2017-05-22 12:29:03 +02:00
parent ff241b1969
commit 191ea5102d

View file

@ -49,6 +49,9 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit {
ngOnInit() {
if (this.fittext) {
if(this.activateOnInputEvents) {
this.setFontSize(this.container.clientHeight);
} else {
this.setFontSize(this.container.clientWidth);
this.el.nativeElement.style.setProperty('will-change', 'content');
}