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

Gradients from SVG to pathgroup, exported with JSON does not look the same when imported back again #2456

Closed
bonny opened this issue Aug 31, 2015 · 4 comments · Fixed by #2486
Assignees
Labels

Comments

@bonny
Copy link

bonny commented Aug 31, 2015

We have and SVG image that we import to Fabric. After import it looks ok.
If we export the Fabric canvas to JSON and then import the JSON again, the image does not look the same any longer.

Attached is an image where the left image is the correct look. Both the SVG logo and the look of the Fabric canvas at first is like this. The right image show the image after we have exported the fabric canvas to JSON and then imported it back again to a new fabric canvas object. As you see it looks slightly different, the bottom right shadow have moved to the left (I think, because that area is much darker now).

jsbin with example code to replicate this:
http://jsbin.com/teyoyu/1/

fabricjs-svg-import-export-bug

@asturur
Copy link
Member

asturur commented Aug 31, 2015

Thanks for correct issue preparation.
I will look into it as soon as possible.

@asturur asturur changed the title Canvas exported with JSON does not look the same when imported back again Gradients from SVG to pathgroup, exported with JSON does not look the same when imported back again Aug 31, 2015
@asturur asturur self-assigned this Aug 31, 2015
@bonny
Copy link
Author

bonny commented Sep 8, 2015

If it helps, here is the same (or just similar?) problem happening with another image:

http://jsbin.com/buqokapora/1/

fabric-export-import-bug-2

@asturur
Copy link
Member

asturur commented Sep 19, 2015

Ok found, is an easy fix at least.

@bonny
Copy link
Author

bonny commented Sep 21, 2015

Thanks for the quick fix. My tests also show that it works correct now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants