@byted/qrcode-generator
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -35,3 +35,3 @@ var qrcode = require("qrcode"); | ||
qrcode.canvasInstance[cus_id] = document.createElement("canvas"); | ||
qrcode.canvasInstance.setAttribute("id", "byted-qrcode-generator_" + cus_id); | ||
qrcode.canvasInstance[cus_id].setAttribute("id", "byted-qrcode-generator_" + cus_id); | ||
document.body.appendChild(qrcode.canvasInstance[cus_id]); | ||
@@ -46,5 +46,3 @@ } | ||
let imageSrc = qrcode.canvasInstance[cus_id].toDataURL("image/png").replace("image/png", "image/octet-stream"); | ||
qrcode.blobInstance[cus_id] = Util.convertBase64UrlToBlob(imageSrc); | ||
resolve(qrcode); | ||
@@ -101,3 +99,3 @@ } | ||
console.error(`[byted-qrcode-generator] exportImage Error. the canvasInstance named '${id}' does not exist, please render QRCode first.`); | ||
return; | ||
reject(qrcode); | ||
} else { | ||
@@ -104,0 +102,0 @@ var link = document.createElement("a"); |
{ | ||
"name": "@byted/qrcode-generator", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A tool for generating qrcode. Support to render canvas, display image, download image file and execute callback, upload image file and execute callback, add customized picture to the center of the qrcode and etc.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9154