I have a cookie, called ‘plan’ which contains a string value representing a RaphaelJS canvas and some objects within it as SVG. The exact paths etc may vary, but here’s typlically what’s being saved to the cookie:
<svg height="100%" version="1.1" width="100%" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative;"><desc>Created with Raphaël 2.0.1</desc><defs/><path style="" fill="none" stroke="#d9e026" d="M153,74L384,74L384,304L0,304L0,150L153,150L153,74"/><path style="" fill="#333333" stroke="#d9e026" d="M160,160L160,220L220,220A60,60,0,0,0,160,160" transform="matrix(1, 0, 0, 1, -103, 84)"/><rect x="121.53846153846155" y="158.5" width="76.92307692307692" height="3" r="0" rx="0" ry="0" fill="#333333" stroke="#d9e026" style="" transform="matrix(1, 0, 0, 1, -89, -9)"/><rect x="83.0769230769231" y="156" width="76.92307692307692" height="5" r="0" rx="0" ry="0" fill="#333333" stroke="#d9e026" style="" transform="matrix(0, -1, 1, 0, 223.038, 364.039)"/></svg>
Now I need to be able to pass this data into a new raphaeljs object on a new page and add some more paths etc into it.
Can anyone suggest how to do this as I’m struggling to know where to start?
Thanks!
Theres a spiffing new function in Raphael 2 which also simplifies these tasks
Paper.add
http://www.irunmywebsite.com/raphael/additionalhelp.php?v=2&q=paper.add