At my appliction after user enter data he needs to sign, I'm using signature-pad plugin: https://github.com/szimek/signature_pad and put the signature in modal of bootstrap4.
The issue is that before I open the modal, the canvas inside it has size of 0x0 pixels, so I need to resizing the screen and initializing the library whene the modal is opened.
I tried send the modal-body when calculate the width. I put width and heigth manual - dosnt work good.
<script>
$('#myModal').on('show.bs.modal', function (e) {
console.log("modal open");
resizeCanvas();
});
</script>