quick fix activateOnInputevent
This commit is contained in:
parent
ff241b1969
commit
191ea5102d
1 changed files with 5 additions and 2 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue