canvas-signature
v1.0.0
Published
canvas-signature is a canvas based signature capture tool to be used when you need users digital signature on forms. examples would be bank account opening authorization.
Downloads
3
Maintainers
Readme
canvas-signature
##introduction canvas-signature is a canvas based signature capture tool to be used when you need users digital signature on forms. examples would be bank account opening authorization.
design pattern
canvas-signature is built in C++ using the processingjs library for canvas
setup
canvas-signature requires an arbitraty html element container encapsulating a canvas element .
the canvas element and it's parent require id attributes and can be renamed appropriately as long as they are mapped in the signature.pde file as well
example:
the data-processing-sources attribute of the canvas element is the location of the signature.pde. if you shoved it somewhere else in your directory, map it accordingly.
additionally, you must include the processingjs library itself. here we use the CDN version from cdnjs
signature.pde
this is the core 'sketch' that runs the signature canvas app. it creates the buttons, image src you need.
additionally, you can set the callback property to true and the callback_function which is invoked after the user clicks save. the example html file simply has a callback that opens a new window with the signature image.. ..to do with as you please.
all parameters are documented for their intended use, customize as you wish.
make sure you check out the example page