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

Problem with custom class and loadFromJSON #3104

Closed
godzie44 opened this issue Jul 13, 2016 · 1 comment · Fixed by #3146
Closed

Problem with custom class and loadFromJSON #3104

godzie44 opened this issue Jul 13, 2016 · 1 comment · Fixed by #3146
Labels

Comments

@godzie44
Copy link

godzie44 commented Jul 13, 2016

Version

1.6.3

Test Case

http://jsfiddle.net/a83g2qx4/2/

Steps to reproduce

Try to save and load custom class objects. Inside constructor must be create another object in object:added event, but it fail when use loadFromJSON method.

Temporary solution

in fabric.util.enlivenObjects change _this.insertAt(obj, index, true); to _this.insertAt(obj, index, false);

@asturur
Copy link
Member

asturur commented Aug 7, 2016

Yes i think you are right. splice is safer most of the time.

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.

2 participants