diff --git a/docs/qr.html b/docs/qr.html new file mode 100644 index 0000000..a5b646a --- /dev/null +++ b/docs/qr.html @@ -0,0 +1,52 @@ + + + + + QR Code Styling + + + +
+ + + \ No newline at end of file diff --git a/src/services/CreateQr.ts b/src/services/CreateQr.ts index f40f5c8..b90f28e 100644 --- a/src/services/CreateQr.ts +++ b/src/services/CreateQr.ts @@ -30,6 +30,7 @@ export default function CreateQr({qr_id}:{qr_id: string | undefined}) { width: 200, height: 200, + type: 'canvas', image: "", data: 'https://hope-fly.de/dog/'+ qr_id, @@ -39,11 +40,27 @@ export default function CreateQr({qr_id}:{qr_id: string | undefined}) type: "square" }, imageOptions: - { - crossOrigin: "anonymous", - margin: 0 - } + { + crossOrigin: "anonymous", + margin: 0 + }, + cornersSquareOptions: + { + type: "extra-rounded", + } }); + + let canv: any = qrCode._canvas!.getCanvas() as HTMLCanvasElement; + canv.toBlob(({blob}:{blob: Blob | MediaSource}) => + { + const file = URL.createObjectURL(blob); + console.log(blob); + console.log(file); // this line should be here + },'image/png'); + + + + // upload(qrCode._svg as File); console.log(qrCode); }