Skip to content
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

Do not throw error when width or height is zero #52

Open
hypnoce opened this issue Aug 6, 2021 · 0 comments
Open

Do not throw error when width or height is zero #52

hypnoce opened this issue Aug 6, 2021 · 0 comments

Comments

@hypnoce
Copy link

hypnoce commented Aug 6, 2021

In case the innerWidth or height of an element is zero, the lib throws an error :

throw new Error('Set a static height and width on the target element ' + el.outerHTML +

I think we can add an option to gracefully fail and ignore those edge cases.
WDYT ?

hypnoce pushed a commit to hypnoce/textFit that referenced this issue Aug 6, 2021
…eight. Default is false to keep current behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant