Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty QR Code on multiple new Qrious() #107

Open
jeremy-saidani opened this issue Nov 22, 2017 · 4 comments
Open

Empty QR Code on multiple new Qrious() #107

jeremy-saidani opened this issue Nov 22, 2017 · 4 comments

Comments

@jeremy-saidani
Copy link

Hi,

I have an old problem with Qrious.
first, I'm using it in an ionic project.

I need to generate base64 QR Code, that works fine for the first QR Code, but all the next QR Code are empty. And the result of toDataURL() are the same.

Here is my code :

var q1 = new Qrious({ value: 'commande-111595', size: 300, });
var q2 = new Qrious({ value: 'article-5555', size: 300, background:'black', foreground:'white', });
var q3 = new Qrious({ value: 'test-test', size: 300, background:'red', foreground:'white', });

console.log(q1); console.log(q1.toDataURL());

console.log(q2); console.log(q2.toDataURL());

console.log(q3); console.log(q3.toDataURL());

And that's the result of the console.log :
{_background: "white", _backgroundAlpha: 1, _element: undefined, _foreground: "black", _foregroundAlpha: 1, …}
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAa20lEQVR4Xu2c0W5subFDx///0ZODBHHakza2uFSiVGrex4uSyCIpnm0j46+///zfX/m/KBAFokADBb5SWA1cCsUoEAX+rUAKK0GIAlGgjQI/Cuvr66sN8ZuJdvkpneaF7tcF7+Zs7tjtNS8prB0OPGDSB+1epUuBUD3pfm4fbsdLYR3uMH1g7rXog6b7dcFz+3A7XgrrcIfpg3av1aVAqJ50P7cPt+OlsA53mD4w91r0QdP9uuC5fbgdL4V1uMP0QbvX6lIgVE+6n9uH2/FSWIc7TB+Yey36oOl+XfDcPtyOl8I63GH6oN1rdSkQqifdz+3D7XgprMMdpg/MvRZ90HS/LnhuH27HS2Ed7jB90O61uhQI1ZPu5/bhdrwU1uEO0wfmXos+aLpfFzy3D7fjpbAOd5g+aPdaXQqE6kn3c/twO14K63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J+VJfajYL4VFXVt4jhpLg0RXoTwpnns/ypOec+tJeVIfKvb7UVh0gZyLAlEgCjgUSGE5VA5GFIgCJQqksEpkzCVRIAo4FPgXy1E31hCo1D4AAAAASUVORK5CYII=
{_background: "black", _backgroundAlpha: 1, _element: undefined, _foreground: "white", _foregroundAlpha: 1, …}
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAIsElEQVR4Xu3UgQkAIAwDQbv/0Fbc4uE6QbiUzH13HAECBAICY7ACLYlIgMAXMFgegQCBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQl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ECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISILD2Pqy5yiWJbQAAAABJRU5ErkJggg==
{_background: "red", _backgroundAlpha: 1, _element: undefined, _foreground: "white", _foregroundAlpha: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AYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISIGCw/AABAhkBg5WpSlACBAyWHyBAICNgsDJVCUqAgMHyAwQIZAQMVqYqQQkQMFh+gACBjIDBylQlKAECBssPECCQETBYmaoEJUDAYPkBAgQyAgYrU5WgBAgYLD9AgEBGwGBlqhKUAAGD5QcIEMgIGKxMVYISILD2Pqy5yiWJbQAAAABJRU5ErkJggg==

The second and the third are shorter than the first, and excactly the same

Hope someone could help me !

@mst94
Copy link

mst94 commented May 20, 2023

I've got the same issue, only the last qr code canvas I created inside my for-loop is filled.
All canvas have an unique id.

Does somebody have a glue how qrious works for creating several qr codes at once?

@ROBERT-MCDOWELL
Copy link

did you try to destroy the previous Qrious object completely?
alos it's better to use a loop and create the Qrious object inside the loop then destroy it.

@mst94
Copy link

mst94 commented May 20, 2023

I tried it this way:

window.addEventListener("load", function() {
        for (task of tasks) {
            document.getElementById("tasks").innerHTML += `  <div class="task-container">
            <div>${task.Task}</div>
            <canvas id="qrcode_${task.ID}"></canvas> 
            </div>`;
            const code = new QRious({ element: document.getElementById("qrcode_" +task.ID), value: "https://example.com" });
            delete code;
        }
    });

Only the ver last canvas is filled with an qr code, but all canvas are existing.

@ROBERT-MCDOWELL
Copy link

this logic does not look very efficient indeed.... I don't remember but maybe there is a destroy() or clear() method in qrious class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants