Created
June 13, 2018 16:39
-
-
Save plateaukao/f5cf746063bba702cdb00f91d4991fa9 to your computer and use it in GitHub Desktop.
Signature_Pad Undo feature implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('undo').addEventListener('click', function () { | |
var data = signaturePad.toData(); | |
if (data) { | |
data.pop(); // remove the last dot or line | |
signaturePad.fromData(data); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment