lmeireles / pen-js

A lightweight js drawingboard / signaturpad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A lightweight js drawingboard / signaturpad

License:ISC License


Languages

Language:JavaScript 100.0%