-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Free Drawing, Grouping and loading JSON #2095
Comments
i m gonna check it later if is a bug i ll commit a fix. |
I think it has something to do with "what" you free draw :) Circles with lines through them, or crosses always recreate the bug for me. But non-crossing lines don't seem too. |
Any further help with this would be much appreciated... Unfortunately it is a showstopper in a HTML5 app I am releasing this week. @kangax any ideas about this interesting issue? |
@chrisrickard I have tested by recent version of fabric.js. |
@sapix yeah I noticed that.. so was avoiding upgrading (as the position bug remained, but also had a fill color issue) |
@chrisrickard How about this? https://jsfiddle.net/sapics/x0sLhgtj/17/ |
@sapics same result im afraid - http://imgur.com/Ax5hjrE |
Hi @saphics, that seems to work - but creates another odd issue. When you click canvas1 (after toJSON'ing).. it repositions the group? :/ See animated gif: http://giphy.com/gifs/xTiTntnWGVlz496L4I |
@chrisrickard Oh, sorry. I fixed it to https://jsfiddle.net/sapics/x0sLhgtj/20/ |
@sapics Fantastic you did it, we make a great team 👍 |
so the bugs with current version are? could you be more clear? i m trying to squash as more bugs as possible |
I see #2101, sadly i m not so group guru and i need time to understand if this is the right fix. |
@sapics I think there may be an issue caused by your fix, so I have reopened this issue. Steps to recreate:
The result is the last action seems to be "rerun". E.g - if you resize the path smaller, every time you reload the JSON it gets smaller and smaller. See this fiddle: https://jsfiddle.net/mq00xq3y/7/ I wasn't 100% sure if it's from your change, but I couldn't seem to recreate it with the current dist version. |
@chrisrickard Thank you for your report! |
I fixed in https://jsfiddle.net/sapics/mq00xq3y/77/. This issue have not fixed yet. |
@chrisrickard I have fixed Path Class. it looks work well. |
why path class? does it is not about group's object toObject method general problem? |
@asturur There are two problems. |
Seems to be fixed, thanks @sapics - your a lifesaver! |
I maybe mistaken, but simply taking the last fiddle from this thread by @sapics and replacing the source with the latest version of fabricjs, the issue of the path objects being filled on re-load seems to still be a problem? Or is it that the approach taken in the fiddle is no longer compatible? https://jsfiddle.net/z8d4fb35/ On a side note, are you actually able to load a path object into the objects array as opposed to loading as JSON? So for example, if you serialized to a path object, could you take that object and manually start adding it to the canvas via pushing to the objects array? |
Please try master-build as https://jsfiddle.net/sapics/z8d4fb35/2/. |
@sapics looks great thanks! Adding the object returned directly to canvas doesn't work i.e. |
@newtriks That's good! |
When creating Group of free drawing segments, exporting toJSON, and then re-loading the same JSON - the paths are all misplaced.
See this fiddle: https://jsfiddle.net/xvzms0j6/17/
And an animated gif of an exact example: http://giphy.com/gifs/3oEduMXd7lMxKZk6ly
Essentially I wish to create a Group from free drawing paths, and allow placement to say the same when exporting and importing.
Any ideas?
The text was updated successfully, but these errors were encountered: