minecraft-map icon indicating copy to clipboard operation
minecraft-map copied to clipboard

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

Open Treer opened this issue 8 years ago • 0 comments

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 avatar Mar 26 '18 01:03 Treer