mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-03 18:07:41 -08:00
Always call resizeCanvas
This commit is contained in:
parent
2a21cce4f5
commit
d0378070c8
|
@ -111,9 +111,9 @@
|
|||
signaturePad;
|
||||
|
||||
// Adjust canvas coordinate space taking into account pixel ratio,
|
||||
// to make it look crisp on mobile devices.
|
||||
// This also causes canvas to be cleared.
|
||||
if (window.matchMedia("(min-width: 768px)").matches) {
|
||||
// to make it look crisp on smaller screens.
|
||||
// https://github.com/szimek/signature_pad#handling-high-dpi-screens
|
||||
// (This also causes canvas to be cleared.)
|
||||
function resizeCanvas() {
|
||||
// When zoomed out to less than 100%, for some very strange reason,
|
||||
// some browsers report devicePixelRatio as less than 1
|
||||
|
@ -125,7 +125,6 @@
|
|||
}
|
||||
window.onresize = resizeCanvas;
|
||||
resizeCanvas();
|
||||
}
|
||||
|
||||
signaturePad = new SignaturePad(canvas);
|
||||
|
||||
|
|
Loading…
Reference in a new issue