【发布时间】:2011-11-23 07:13:38
【问题描述】:
我有一个名为“plan”的 cookie,它包含一个字符串值,表示 RaphaelJS 画布和其中的一些对象作为 SVG。确切的路径等可能会有所不同,但通常是保存到 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>
现在我需要能够将这些数据传递到新页面上的新 raphaeljs 对象中,并向其中添加更多路径等。
任何人都可以建议如何做到这一点,因为我正在努力知道从哪里开始?
谢谢!
【问题讨论】: