EasyQRCodeJS
EasyQRCodeJS copied to clipboard
The logo flashes when code changing
Hi, thanks for the amazing work.
I currently met an issue when trying to use makeCode(text) method on QR code with a logo, the logo flashes as the code changing. Check the link to produce it in codesandbox.
Could you help take a look?
Yes, you are right.
Actually makeCode function need to clear the canvas content and repaint, and drawing the logo image is asynchronous.
If you don't want to see flashes while drawing, you can to control and display after rendering is complete. The onRenderingEnd(qrCodeOptions, dataURL) function can let you know that the drawing is done.
Hey @ushelp , thanks for the response.
display after rendering is complete
sounds not an option to me, since I was trying to use it for fountain code, which makes it never stops rendering new content.
I guess I need to either render the logo myself, or use something else,
You can assess whether this will actually affect your rendering(Stop your rendering).
It just let every QRCode image shows at the right time, refreshes/display your qrcode when it's completely done. No block for your fountain code.
Closed, no comments for a long time.