I need to dynamically change the width of signature pad. How can i do it?
<signature-pad class="signature w-50-p" id="sign_canvas" fxFlexAlign.xs="center"></signature-pad>
html:
<signature-pad fxFlex="1 1 50" (window:resize)="resizeSignaturePad()"
class="signature"
id="sign_canvas" fxFlexAlign.xs="center"></signature-pad>
ts:
resizeSignaturePad() {
this.signaturePad.set('canvasWidth', document.getElementById("sign_canvas").offsetWidth);
this.signaturePad.clear();
}