fix
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
"@angular/platform-browser-dynamic": "^15.0.0",
|
"@angular/platform-browser-dynamic": "^15.0.0",
|
||||||
"@angular/router": "^15.0.0",
|
"@angular/router": "^15.0.0",
|
||||||
"angularx-qrcode": "^15.0.1",
|
"angularx-qrcode": "^15.0.1",
|
||||||
|
"canvas": "^2.11.2",
|
||||||
"daisyui": "^2.49.0",
|
"daisyui": "^2.49.0",
|
||||||
"deepl": "^1.0.13",
|
"deepl": "^1.0.13",
|
||||||
"geolib": "^3.3.3",
|
"geolib": "^3.3.3",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
allowfullscreen>
|
allowfullscreen>
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
<button>
|
<button >
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17.334" height="23.4863">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17.334" height="23.4863">
|
||||||
<g>
|
<g>
|
||||||
<rect height="23.4863" opacity="0" width="17.334" x="0" y="0"/>
|
<rect height="23.4863" opacity="0" width="17.334" x="0" y="0"/>
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import {Component, OnInit} from '@angular/core';
|
|||||||
import {ActivatedRoute} from "@angular/router";
|
import {ActivatedRoute} from "@angular/router";
|
||||||
import {positionService} from "../service/position.service";
|
import {positionService} from "../service/position.service";
|
||||||
import { getDistance } from 'geolib';
|
import { getDistance } from 'geolib';
|
||||||
// @ts-ignore
|
|
||||||
import * as sharp from 'sharp';
|
|
||||||
// @ts-ignore
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -65,23 +62,24 @@ export class DetailComponent implements OnInit {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// async generateQRCodeImage(url: string): Promise<Buffer> {
|
/*
|
||||||
|
async generateQRCodeImage(url: string): Promise<Buffer> {
|
||||||
// Crea il QR code
|
// Crea il QR code
|
||||||
// const qrCode = await qrcode.toDataURL(url, { errorCorrectionLevel: "H" });
|
const qrCode = await qrcode.toDataURL(url, { errorCorrectionLevel: "H" });
|
||||||
|
|
||||||
// Crea il canvas
|
// Crea il canvas
|
||||||
//const canvasInstance = canvas.createCanvas(300, 300);
|
const canvasInstance = canvas.createCanvas(300, 300);
|
||||||
//const ctx = canvasInstance.getContext("2d");
|
const ctx = canvasInstance.getContext("2d");
|
||||||
|
|
||||||
// Carica il QR code nell'immagine
|
// Carica il QR code nell'immagine
|
||||||
// const qrCodeImage = await canvas.loadImage(qrCode);
|
const qrCodeImage = await canvas.loadImage(qrCode);
|
||||||
|
|
||||||
// Disegna il QR code nell'immagine
|
// Disegna il QR code nell'immagine
|
||||||
//ctx.drawImage(qrCodeImage, 0, 0, 300, 300);
|
ctx.drawImage(qrCodeImage, 0, 0, 300, 300);
|
||||||
|
|
||||||
// Ritorna l'immagine come buffer
|
// Ritorna l'immagine come buffer
|
||||||
// return canvasInstance.toBuffer();
|
return canvasInstance.toBuffer();
|
||||||
// }
|
}*/
|
||||||
|
|
||||||
/*generateQR() {
|
/*generateQR() {
|
||||||
console.log("generating QR code");
|
console.log("generating QR code");
|
||||||
|
|||||||
Reference in New Issue
Block a user