Skip to content

YannickBochatay/JSYG.PathDrawer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
});

About

JSYG plugin for drawing interactive svg paths

Resources

License

Stars

Watchers

Forks

Packages

No packages published