When a svg doesn't explicitly set a size or a viewport, it is possible to calculate the current bounds using the path.
In addition (if you think it useful), it is possible to specify a usePathBounds flag to always ignore the viewport specifications and calculate the icon bounds instead.
Thanks, L
Code quality
[ X ] I made some tests for my changes
[ ] I added my name in the
contributors
field of the package.json file
License
To get your contribution merged, you must check the following.
[ X ] I read the project license in the LICENSE file
[ X ] I agree with publishing under this project license
Coverage increased (+0.8%) to 57.797% when pulling c059983e60c0ccbf7c82a5de3a83ebb8000975b4 on iongroup:fix/bounds into 26d09143949ac8816fdac5ce30bc34350e50e770 on nfroidure:master.
Fixes #
When a svg doesn't explicitly set a size or a viewport, it is possible to calculate the current bounds using the path. In addition (if you think it useful), it is possible to specify a
usePathBounds
flag to always ignore the viewport specifications and calculate the icon bounds instead.Thanks, L
Code quality
License
To get your contribution merged, you must check the following.