jsyg-pathdrawer

1.0.0 • Public • Published

JSYG.PathDrawer

drawing interactive svg paths with JSYG framework

Demo

http://yannickbochatay.github.io/JSYG.PathDrawer

Installation
npm install jsyg-pathdrawer
Example with webpack/babel
import PathDrawer from "jsyg-pathdrawer"

let pencil = new PathDrawer();

document.querySelector("svg").addEventListener("mousedown",function(e) {
               
    if (pencil.inProgress) return;

    let path = document.createElementNS("http://www.w3.org/2000/svg","path");
    //with JSYG framework : path = JSYG("<path>")

    this.appendChild(path);

    pencil.draw(path,e);
});

Package Sidebar

Install

npm i jsyg-pathdrawer

Weekly Downloads

109

Version

1.0.0

License

MIT

Unpacked Size

14.5 kB

Total Files

5

Last publish

Collaborators

  • ybochatay