This update is based upon issue #213 #228
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quote:
"If an image is taking longer to download than usual, then the "could not extract height/width" error was being displayed. It couldn't be extracted because the image wasn't done downloading yet."
I've added a comment into that issue's thread and would've wanted to update Michael's code itself but was unable to find out how to do so - I'm a noobie to GitHub... So please forgive me if I'm doing this the wrong way and point me in the right direction if you know how to modify a user-submitted "pull request".
I've commented the code as best as I know how and if you wish to see the full reasoning for why I'm submitting this, please visit the original issue:
#213 (comment)
Many thanks for your kind patience!
Best regards,
Anand
Comments from Issue #213
Hey there!
I found that the fix implemented above was NOT working in Firefox for some reason (version 7.0.1).
I rewrote the section submitted by Michael Weichert and got it to work for me. If you wish to see it in action, please visit http://gaysil.com/my-old-portfolio.
I do not know how to add my changes or "request a pull" for my changes as I'm new to GitHub... thus I've simply pasted the block of code below:
EDIT (2011-12-03):
@aino:
I noticed the comment from @janpub and when I came back to read it, realised that I'd not commented my code, nor the logic behind it. I've updated the code block above with clarification on the purpose for each section. There's also a more human-readable version of the commenting below in my reply to @janpub...
By the way, I never mentioned it to you aino (and this may not be the place for it) but I'll say it now, you are AWESOME and I LOVE Galleria and the way you've built it, you are a role model to me and I thank you for sharing Galleria with the world! Thanks!
@janpub:
Hey there! Just curious about whether you tried replacing mweichert's code with the code I submitted. If you replace Micheal's stuff with what I've written in the nightly build, it should work. I was in a bit of a rush when I submitted the suggestion and didn't explain myself properly. Essentially, IMHO the image was not loading (for me in FF7+) because at the moment that the browser engine started to parse that part of the code, the image's container was set to "display:none".
This is something I've come across before - a browser not admitting that an element has a height or width (like an ) if the parent is set to "display:none"... this is because, as such, the parent is = 0 dimensions and so the engine simply doesn't bother to calculate the dimensions of child elements.
It's for this reason that my code creates a "dummyContainer" which is an element that is "display:static" BUT
thus, the dummyContainer's dimensions along with the dimensions of the child are calculated and then returned as expected by aino's original block of code.