Reputation: 21
I am using raphael lib for but when i open my svg file it has following code and there is no way to set these params if i put path without it map is not show.
<g transform="translate(0.000000,524.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
Upvotes: 0
Views: 108
Reputation: 61046
Raphaël doesn't support <g> elements, but there's a related concept called sets. However these sets aren't actually represented in the DOM.
I think your question is probably "How do I import my existing SVG files into Raphaël". Have you tried searching for answers along those lines? A quick search shows e.g Raphael JS - Use a SVG file.
Upvotes: 1
Reputation: 1757
If I read your question correctly what you need to do is parse out the contents of the transform attribute and call Element.translate for the translate and Element.scale for the scale.
Upvotes: 0