Responsive signature pad #535
jcamilovallejos
started this conversation in
General
Replies: 1 comment
-
It is my technique to deal with responsiveness var wrapper = document.getElementById("signature-pad");
var canvas = wrapper.querySelector("canvas");
var signaturePad = new SignaturePad(canvas, {
backgroundColor: 'transparent',
});
function resizeCanvas() {
canvas.width = wrapper.offsetWidth - 2;
canvas.height = canvas.width * (3/5);
signaturePad.clear();
}
window.onresize = resizeCanvas; You can create function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I make or build it responsive canvas ? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions