pen-js

1.0.1 • Public • Published

pen-js

PenJs is a basic, lightweight js drawing board that is easy to customize and improve, hope you enjoy :)'

Installation

You can download de source code from github, or use npm to download the package. npm:
npm install pen-js --save

After importing PenJs you just have to initialize the plugin:

var pen = new PenJs('#my-container-id');


###Public Methods

I will be adding functionalities to this as the library evolve, for now we have this :)

.toDataURL(outputType)
outputType optional, can be 'jpg' or 'png', default is 'png'.
Will return a base64 representation of the drawing.

.redraw()
Will repaint the canvas.

.clear()
Will clear the canvas.

Package Sidebar

Install

npm i pen-js

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • lmeireles