quick fix activateOnInputevent
This commit is contained in:
parent
ff241b1969
commit
191ea5102d
1 changed files with 5 additions and 2 deletions
|
|
@ -49,6 +49,9 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.fittext) {
|
if (this.fittext) {
|
||||||
|
if(this.activateOnInputEvents) {
|
||||||
|
this.setFontSize(this.container.clientHeight);
|
||||||
|
} else {
|
||||||
this.setFontSize(this.container.clientWidth);
|
this.setFontSize(this.container.clientWidth);
|
||||||
this.el.nativeElement.style.setProperty('will-change', 'content');
|
this.el.nativeElement.style.setProperty('will-change', 'content');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue