You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, as per Mozilla Bug ID #700533 (funnily enough - opened 9 years ago, and still open...), Firefox returns a 0 on both naturalWidth and naturalHeight when using an SVG image.
As such, on Firefox and when using SVG, it's locked in a permanent "waiting for the image to load" loop. The image is, of course, loaded.
If I return true from there, everything else works as exepcted.
The text was updated successfully, but these errors were encountered:
For now, I've fixed my local version by adding a check against SVG + Mozilla combo, and then returning true. I'm using Promises to load up the image, I'm pretty sure it's loaded by that point.
Perhaps it could be something I can switch off in the params? Something like
assumeImageLoaded: true /* skips testing whether the map image is loaded or not */
I traced the issue down to the canvas context, this bit:
if(typeof img.naturalWidth != "undefined" && img.naturalWidth === 0) {
Unfortunately, as per Mozilla Bug ID #700533 (funnily enough - opened 9 years ago, and still open...), Firefox returns a 0 on both
naturalWidth
andnaturalHeight
when using an SVG image.As such, on Firefox and when using SVG, it's locked in a permanent "waiting for the image to load" loop. The image is, of course, loaded.
If I return
true
from there, everything else works as exepcted.The text was updated successfully, but these errors were encountered: