boyfromnorth
boyfromnorth

Reputation: 1013

Saving the state of HTML5 canvas after drag and drop.etc

I have created like a design studio and it has different functionalities like drag and drop,resize,text ,fonts, etc. Example:User selects an image and then add some graphics over it and then add text over it,,. is thr any way I can save the session and if the user resumes it later.. He gets the stuff the way he left it. I don't need a jpeg image of the canvas.. I need to save the state so that user can manipulate it later.. Is it possible? I have used kinetic js for this so if someone has any idea thn please help/

Thanks

Upvotes: 2

Views: 1088

Answers (1)

Eric Rowell
Eric Rowell

Reputation: 5219

yep, KineticJS will be releasing serialization and de-serialization this weekend :)

var json = stage.toJSON();

and

stage.load(json);

Cheers!

Upvotes: 4

Related Questions