项目作者: gagan-bansal

项目描述 :
Parse svg string to svg DOM element
高级语言: JavaScript
项目地址: git://github.com/gagan-bansal/parse-svg.git
创建时间: 2014-09-26T02:04:21Z
项目社区:https://github.com/gagan-bansal/parse-svg

开源协议:MIT License

下载


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:

  1. var myPathEle = parseSVG(
  2. '<path d="M100,100 L150,100 L150,150 Z" style="stroke: #0000cc; stroke-width: 2px; fill: #ccccff;"></path>'
  3. );

License

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