@byted/qrcode-generator
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -140,5 +140,9 @@ var qrcode = require("qrcode"); | ||
var canvas = document.getElementById(id); | ||
var ctx = canvas.getContext("2d"); | ||
ctx.setTransform(1, 0, 0, 1, 0, 0); | ||
ctx.clearRect(0, 0, canvas.width, canvas.height); | ||
if(!canvas || canvas.nodeName.toLowerCase() !== "canvas") { | ||
console.error("[byted-qrcode-generator] the qrcode instance you want to destroy does not exist, qrcode.destroy() has been cancelled."); | ||
} else { | ||
var ctx = canvas.getContext("2d"); | ||
ctx.setTransform(1, 0, 0, 1, 0, 0); | ||
ctx.clearRect(0, 0, canvas.width, canvas.height); | ||
} | ||
} | ||
@@ -145,0 +149,0 @@ |
{ | ||
"name": "@byted/qrcode-generator", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"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", |
Sorry, the diff of this file is not supported yet
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
10151
205