parse-svg

Parse svg string to svg DOM element.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
parse-svg
0.0.09 years ago9 years agoMinified + gzip package size for parse-svg in KB

Readme

parse-svg
Parse svg string to svg DOM element. Original source code is from bobince

Getting Started

include parse-svg.min.js in your app.
`` <script type="text/javascript" src="path/to/parse-svg.min.js"></script>``
It creates global variable parseSVG function.
usage: `` var svgEle = parseSVG('svg string');``
example:
var myPathEle = parseSVG(
  '<path d="M100,100 L150,100 L150,150  Z"  style="stroke: #0000cc; stroke-width: 2px;  fill: #ccccff;"/>'
);

License

Copyright (c) 2014 Gagan Bansal
Licensed under the MIT license.