Raphael.JSON icon indicating copy to clipboard operation
Raphael.JSON copied to clipboard

Json Export

Open sumikumar opened this issue 11 years ago • 0 comments

Hello,

I have the following code implemented. http://jsfiddle.net/JQPurfect/gdmk2xg5/1/

All I'm trying to do is export the rectangle + arrow data to json. I already wrote the function that export data to .json however I cannot get it to work :).

Here are the formats I need:

Circle: {"id":27,"localId":2,"type":"o-circle","centerX":153,"centerY":121,"radius":25,"hexColor":"#FFFF00","strokeWidth":2.0}'

Arrow: {"id":28,"localId":3,"type":"o-arrow","data":"M15,252L207,136L167.94462449467756,146.491789367799M207,136L179.54462449467758,165.69178936779898","hexColor":"#FFFF00","strokeWidth":2.0}'

Text: {"id":53,"localId":6,"type":"o-text","data":"ppppppppppppp","hexColor":"#FFFF00","strokeWidth":1.0,"posX":126,"posY":405}'

Freehand: {"id":30,"localId":7,"type":"o-path","data":"M-12,54L-11,54L-9,54L-7,54L-3,54L4,56L17,57L38,60L63,64L83,67L96,68L109,70L117,71L122,72L126,72L129,72L131,72L132,72L135,72L137,72L140,73L142,73L147,73L152,74L159,74L165,74L170,74L171,74L173,74L174,74","hexColor":"#FFFF00","strokeWidth":2.0}'

Any help will be great.

Best, S

sumikumar avatar Sep 28 '14 12:09 sumikumar