Moved config into call

This commit is contained in:
Nicolai Ort 2023-04-19 12:07:27 +02:00
parent d68e88ec9a
commit e25aaf3e5e
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -36,7 +36,7 @@
if (is_qrcode) { if (is_qrcode) {
bcid = 'qrcode'; bcid = 'qrcode';
} }
let codeconfig = { bwipjs.toCanvas(canvas, {
bcid, bcid,
text: `${text}`, text: `${text}`,
scale: 10, scale: 10,
@ -44,8 +44,7 @@
textxalign: 'center', textxalign: 'center',
backgroundcolor: 'ffffff', backgroundcolor: 'ffffff',
height: 10 height: 10
}; });
bwipjs.toCanvas(canvas, codeconfig);
return canvas.toDataURL('image/png'); return canvas.toDataURL('image/png');
} }
</script> </script>