Raphael.js to snapsvg and a design question

91 views
Skip to first unread message

Paul Sullivan

unread,
May 3, 2016, 1:12:07 PM5/3/16
to Snapsvg
Hello,
I'm planning on upgrading a project from Raphael to Snapsvg. I found a couple resources about making the changes but wanted to find out about potential problems I could run into.

One of the things I want to do after the upgrade is have the concept of a 'toolbox' containing elements that can be used on the 'paper'. Can anyone give advice on achieving this? Currently with Raphael I have everything together on the 'paper' so when I save and read the Database from the db I'm always reading this unnecessary data.

Thanks for your time,
Paul

Ian

unread,
May 3, 2016, 1:49:14 PM5/3/16
to Snapsvg
Hi,

Not quite sure on the toolbox bit. Do you mean you would have 'tools/methods' in the toolbox or you would have svg elements ?

Paul Sullivan

unread,
May 3, 2016, 1:55:20 PM5/3/16
to Snapsvg
Hello,
I mean I would have a set of lines etc that could be drug on the paper to create a diagram from a 'toolbox'. Maybe it's a dub inside the school element? I'm not sure, just thought I'd get some other input on the idea.

Thanks
Paul

Ian

unread,
May 3, 2016, 6:01:10 PM5/3/16
to Snapsvg
Ok, makes more sense! I was thinking along the lines of a programming toolbox, as opposed to a visual creation toolbox.

I don't see any particular problems migrating over. Snap can do pretty much everything Raphael can do (as long as it doesn't really need too much older browser compatibility). Snap you can reference existing SVG elements, unlike Raph, and you can use real SVG groups in Snap, unlike Raphael.

I think it may be worth being more specific about what precise problems or programming logic you see potential issues with.

Paul Sullivan

unread,
May 3, 2016, 8:02:37 PM5/3/16
to Snapsvg
Cool thanks for the information. One of the reasons I want to use a toolbox is so I don't keep saving the JSON for the tools in the database for every record. Since the elements are always the same I'd like to keep it separate. There are also scenarios where I wouldn't show the toolbox at all. I figured I'd ask in case anyone had experience with something like this using Snap. I haven't finished migrating the Raphael yet so I'm going to working on some options once I'm done.

Thanks,
Paul

Reply all
Reply to author
Forward
0 new messages