39cb6bf49b
When we handle pixel ratios in .png files, we were rounding the pixel ratio to the nearest integer. This mean that if an image had a pixel ration less than 0.5, it would get rounded to zero. This would cause a divide-by-zero on the width & height of the image which would crash the app. This has a couple fixes: - we ignore pixel ratios less that 1 - we perform rounding _after_ we apply the pixel ratio to the width/height ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Upload this funky image: ![shapes_5](https://github.com/tldraw/tldraw/assets/1489520/80fb41fa-3be1-4dbd-8e2f-d81013b09780) 2. Check the app doesn't crash |
||
---|---|---|
.. | ||
api | ||
src | ||
api-extractor.json | ||
api-report.md | ||
CHANGELOG.md | ||
LICENSE.md | ||
package.json | ||
README.md | ||
tsconfig.json |
@tldraw/utils
This package contains utility functions used in various places by other tldraw packages.
Community
Have questions, comments or feedback? Join our discord or start a discussion.
Distributions
You can find tldraw on npm here.
Contribution
Please see our contributing guide. Found a bug? Please submit an issue.
License
The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use.
If you wish to use this project in commercial product, you need to purchase a commercial license. matPlease contact us at hello@tldraw.com for more inforion about obtaining a commercial license.
Trademarks
Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.
Contact
Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.