Moved config into call
This commit is contained in:
parent
d68e88ec9a
commit
e25aaf3e5e
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user