Last active
February 12, 2019 17:07
-
-
Save tandevmode/5699e012e2888066d35c3794e25e6cd3 to your computer and use it in GitHub Desktop.
Prepare Canvas
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
<script src="https://d.line-scdn.net/liff/1.0/sdk.js" /></script> | |
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script> | |
<script> | |
const canvas = document.querySelector('#canvas'); | |
const signaturePad = new SignaturePad(canvas, { | |
backgroundColor: 'rgb(238,238,238)', | |
}); | |
$(window).on('load', function(){ | |
canvas.setAttribute('width', $('.container').width()); | |
canvas.setAttribute('height', window.innerHeight - $('#btn').outerHeight() - 10); | |
signaturePad.clear(); | |
// Initializes a LIFF app | |
liff.init(function (data) {}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment