1.0.7 • Published 2 years ago

@chocolate-pie/vopa-js v1.0.7

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Set SVG Obejct Element (rect, circle, polygon, polyline, eclipse, line) to SVG Path Element (path). The following attributes are inherited when converting to SVG Path Element (path): fill,stroke, stroke-width, style

TagsAttributes
rectx y width height
circlecx cy r
polygonpoints
polylinepoints
eclipserx ry cx cy
linex1 y1 x2 y2
| x y font-size( Not Required. default: 30 )
VopaCreate(svgPath, (err, res) => {
  // function
})
import VopaCreate from '@chocolate-pie/vopa-js'
VopaCreate('<svg xmlns="http://www.w3c.org/2000/svg"><rect x="20" y="20" width="20" height="20" /></svg>', (err, res) => {
  console.log(res)
})
// => <svg xmlns="http://www.w3c.org/2000/svg"><path d="M 20,20 l 0,20l -20,0 l 0 -20 Z"></path></svg>

Demo

git clone https://github.com/chocolate-pie/vopa-js.git
cd vopa-js
npm install
npm run dev
1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago