I have a collection of shapes on a surface that I need to convert to JSON using the dojox.gfx.utils.toJson(surface)
method. Once I have the JSON data, I then utilize
dojox.gfx.utils.fromJson(surface, json)
to append it back to the surface.
However, I encountered an issue when trying to make a node moveable. Despite saving it to JSON and reappending it to the surface, the node loses its moveable functionality. I've been unable to find a solution to restore the moveability of the node post-loading. Is there a way to achieve this?
My goal is to be able to save and load SVG data on my page while still being able to freely move the elements around. While working with Dojo seemed straightforward initially, this particular problem has complicated matters. If achieving this becomes too challenging with Dojo, are there any alternative libraries that could better suit my requirements?
Edit: For reference, here is the actual code snippet: http://pastebin.com/2qLCTw8B