Skip to content

YannickBochatay/JSYG.PolylineDrawer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSYG.PolylineDrawer

Draw polylines and polygon with JSYG framework

Demo

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

Installation
npm install jsyg-polylinedrawer
Example with webpack/babel
import PolylineDrawer from "jsyg-polylinedrawer"

let pencil = new PolylineDrawer()
            
document.querySelector("svg").addEventListener("mousedown",function(e) {

   if (pencil.inProgress) return;

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

   this.appendChild(poly);

   pencil.draw(poly,e);

});

About

Draw polylines and polygon with JSYG framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published