Open Tressa-Sanders opened 4 years ago
I worked it out. I forked the gem and added this to the bottom of the john_hancock.js
function signatureClear() {
var canvas = document.getElementById("JohnHancock-canvas");
var context = canvas.getContext("2d");
context.clearRect(0, 0, canvas.width, canvas.height);
}
Then I used this button code: <button type="button" onclick="signatureClear()">Clear</button>
Want to open a PR to make this function available?
Hi! Any way to add and option to "clear" the canvas like the current signature-pad?