thomasjbradley/signature-pad — Issue #23: How to get the current instance?
Author: mexac
Created: 2011-12-07 12:19:02+00:00
State: open

When I call the plugin method "$('.sigPad').signaturePad(options)" on the HTML element it also returns and API for the instance, so we can assign it to some global variable
var sigPad = $('.sigPad').signaturePad(options);

Is it possible to change the method signaturePad(options) so it will return the current instance (or create a new instance if it was not done previously)?
For example:
var img = $('.sigPad').signaturePad().getSignatureImage();

at present it creates a new instance and returns empty image. I have to use a global variable to solve it

Thanks.