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

Image resizes slightly after loadFromJSON #8178

Closed
AlvesJorge opened this issue Aug 24, 2022 · 3 comments
Closed

Image resizes slightly after loadFromJSON #8178

AlvesJorge opened this issue Aug 24, 2022 · 3 comments

Comments

@AlvesJorge
Copy link

Fiddle:
https://jsfiddle.net/qm30r1bp/33/

Image changes size slightly when loaded from JSON.
I tried checking image scaledheight before and after and it says it is still the same height.
Steps to reproduce:
Notice how the image covers the window top to bottom
Open fiddle
Click on the photo to clear it and load it from json
Notice the red bar under the photo

@ShaMan123
Copy link
Contributor

http://fabricjs.com/fabric-gotchas

NUM_FRACTION_DIGITS

fabric.Object.NUM_FRACTION_DIGITS=15

https://jsfiddle.net/wj9omh8q/

@AlvesJorge
Copy link
Author

Worked like a charm.
Thank you so much, didn't think that I would need to look into the caveat section so early on.

@ShaMan123
Copy link
Contributor

ShaMan123 commented Aug 25, 2022

Good point...
We are working on v6, making fabric modular and typed so ugly global/shared constants like NUM_FRACTION_DIGITS will hopefully fade out in favor of better practice.

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

2 participants