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

onImagesLoaded is being called twice #152

Closed
MariuzM opened this issue Apr 21, 2020 · 1 comment
Closed

onImagesLoaded is being called twice #152

MariuzM opened this issue Apr 21, 2020 · 1 comment

Comments

@MariuzM
Copy link

MariuzM commented Apr 21, 2020

onImagesLoaded is being called twice, one time in mid of rendering and second when its finished.
Any tips on how to work around this so that i only have event when it's finished?

Quick demo of the issue, you will noticed console.log is being used twice.
Untitled

@MariuzM
Copy link
Author

MariuzM commented Apr 21, 2020

This is how I've solved this:

    if (e.progressedCount !== 0) {
      document.querySelector('.portfolio-main').style.opacity = 1
    }

@MariuzM MariuzM closed this as completed Apr 21, 2020
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

1 participant