Ensure canvas size is restricted. devicePixelRatio was used to scale the canvas for devices with higher DPI screens only affecting macs
This commit is contained in:
parent
6b1e6c61fe
commit
2a95bc8457
|
@ -149,7 +149,11 @@
|
|||
{/if}
|
||||
{:else}
|
||||
<div bind:this={canvasWrap} class="canvas-wrap">
|
||||
<canvas id="signature-canvas" bind:this={canvasRef} />
|
||||
<canvas
|
||||
id="signature-canvas"
|
||||
bind:this={canvasRef}
|
||||
style="--max-sig-width: {width}px; --max-sig-height: {height}px"
|
||||
/>
|
||||
{#if editable}
|
||||
<div class="indicator-overlay">
|
||||
<div class="sign-here">
|
||||
|
@ -193,6 +197,10 @@
|
|||
.signature img {
|
||||
max-width: 100%;
|
||||
}
|
||||
#signature-canvas {
|
||||
max-width: var(--max-sig-width);
|
||||
max-height: var(--max-sig-height);
|
||||
}
|
||||
.signature.light img,
|
||||
.signature.light #signature-canvas {
|
||||
-webkit-filter: invert(100%);
|
||||
|
|
Loading…
Reference in New Issue