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