fix: registration code (broke in merge)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
51f8d0fb42
commit
123509d0a6
@ -13,5 +13,4 @@ const config = {
|
||||
url_imprint: '',
|
||||
// optional, will fallback to baseurl_selfservice/privacy
|
||||
url_privacy: '',
|
||||
codeformat: 'code39'
|
||||
};
|
||||
|
@ -638,17 +638,19 @@ import axios from "redaxios";
|
||||
import bwipjs from "bwip-js";
|
||||
|
||||
function textToBase64Barcode(text) {
|
||||
var canvas = document.createElement("canvas");
|
||||
bwipjs.toCanvas(canvas, {
|
||||
bcid: config.codeformat || "code39",
|
||||
const canvas = document.createElement("canvas");
|
||||
let codeconfig = {
|
||||
bcid: config.code_format || "code39",
|
||||
text: `${text}`,
|
||||
scale: 3,
|
||||
height: 10,
|
||||
// width: 10,
|
||||
includetext: false,
|
||||
textxalign: "center",
|
||||
backgroundcolor: "ffffff",
|
||||
});
|
||||
};
|
||||
if (codeconfig.bcid === "code39" || codeconfig.bcid === "code128"|| codeconfig.bcid === "ean13") {
|
||||
codeconfig.height = 10;
|
||||
}
|
||||
bwipjs.toCanvas(canvas, codeconfig);
|
||||
return canvas.toDataURL("image/png");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user