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

canvas.loadFromJSON fails when event listeners add more objects #98

Open
forrert opened this issue Oct 15, 2015 · 0 comments
Open

canvas.loadFromJSON fails when event listeners add more objects #98

forrert opened this issue Oct 15, 2015 · 0 comments

Comments

@forrert
Copy link

forrert commented Oct 15, 2015

My canvas has an event listeners registered creating additional objects, when certain objects are added to the canvas. This causes problems, when I am trying to load objects into the canvas from a JSON object. Some of the objects from the JSON get lost in the process.

JS Fiddle here: https://jsfiddle.net/64spd9vx/2/

I have been able to narrow the bug down to this line: https://github.com/kangax/fabric.js/blob/master/dist/fabric.require.js#L5331

Changing the last parameter from true to false solves this issue. I could create a PR, but would appreciate feedback or comments from experienced contributors. Do you see any issues in changing the parameter?

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