quick fix resize height

This commit is contained in:
Lorenzo Iovino 2017-05-22 12:40:22 +02:00
parent c308b800df
commit 0edd7f854a

View file

@ -34,7 +34,11 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit {
@HostListener('window:resize', ['$event']) @HostListener('window:resize', ['$event'])
onResize() { onResize() {
if(this.activateOnResize && this.fittext) { if(this.activateOnResize && this.fittext) {
if(this.activateOnInputEvents && this.fittext) {
this.setFontSize(this.container.clientHeight);
} else{
this.setFontSize(this.container.clientWidth); this.setFontSize(this.container.clientWidth);
}
this.ngAfterViewInit(); this.ngAfterViewInit();
} }
} }