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

Sometimes it doesn't load the ocean until you reload the page #4

Open
Treer opened this issue Mar 26, 2018 · 0 comments
Open

Sometimes it doesn't load the ocean until you reload the page #4

Treer opened this issue Mar 26, 2018 · 0 comments
Assignees
Labels

Comments

@Treer
Copy link
Owner

Treer commented Mar 26, 2018

Noted by mlippert, and I definitely remember seeing this happen too, but I remember it being intermittent (probably a load-order race-condition) and I can't seem to reproduce it now.

Edit: find out if this is browser specific


Notes for something to try once I have a way to know if the fix works:

Based on a comment on stackoverflow, my guess is the problem may be line 285 of MinecraftMap.main.ts,

 if (result.image.complete) loadHandler();

should perhaps be

 if (result.image.complete && result.image.naturalWidth > 0) loadHandler();

because img.complete doesn't technically always indicate the image is loaded.
(line 285 is there because of a caveat of the load event for cached images)

edit: how about decode()?

@Treer Treer self-assigned this Mar 26, 2018
@Treer Treer added the bug label Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant