-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manually trigger resize? #24
Comments
U can use ngDoCheck to force checking ;) |
@Panda-313 sorry, would you mind explaining how? |
The easiest solution would be to add fit-text as directive, not by npm. You can try this: @input() fittext? = true; constructor( ngDoCheck() { public ngOnInit() { public ngAfterViewInit() { public ngOnChanges(changes: SimpleChanges) { private setFontSize = (): void => { private calculateNewFontSize = (): number => {
}; private setStyles = (fontSize: number, lineHeight: number | string, display: string): void => { |
Hello,
I like that fittext can automatically re-trigger on window resize, and would like to re-trigger the resize on other custom events.
I've tried to use
ngModel
for this, but it was very hacky (I don't want to change the text itself).Is there a way to force a resize?
Thanks
The text was updated successfully, but these errors were encountered: