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

Only center slide after images have loaded #275

Merged
merged 1 commit into from Jun 8, 2015

Conversation

@joeyates
Copy link
Contributor

@joeyates joeyates commented Jun 7, 2015

When slides contain images, the images often have not loaded when the page is centred. This results in images appearing partially off screen.

@joeyates
Copy link
Contributor Author

@joeyates joeyates commented Jun 7, 2015

I believe this fixes #154

@binford2k
Copy link
Member

@binford2k binford2k commented Jun 8, 2015

I'm not able to replicate this. I even set my network to simulate a terrible link and watch an image take four seconds to progressively render, and it was still centered. Can you share more details about what would be causing what you see? Are you using very large images that don't fit on-screen?

I don't see side effects in this code, so I may merge it anyway, but I'd like to believe that we're solving a real problem here.

@joeyates
Copy link
Contributor Author

@joeyates joeyates commented Jun 8, 2015

I have the presentation on Heroku, here is slide 5: https://software-libera-tutti.herokuapp.com/#5

I've switch the Heroku deploy back to HEAD and I see the image cut off.

Example:

showoff-head-heroku

Locally, I get the same result against HEAD. If I check what's happening in showoff.js, I can see that the page height is being calculated before the image has loaded.

If I use my branch, page height is calculated after the image has loaded. As a result, the title appears higher on the page and the whole image is visible.

@binford2k
Copy link
Member

@binford2k binford2k commented Jun 8, 2015

Interesting. I still cannot replicate it locally, but I can see it happen on your presentation. Thanks for the update.

binford2k added a commit that referenced this pull request Jun 8, 2015
Only center slide after images have loaded
@binford2k binford2k merged commit fa2da4c into puppetlabs:master Jun 8, 2015
@joeyates
Copy link
Contributor Author

@joeyates joeyates commented Jun 8, 2015

Thanks for that.

Just for completeness' sake, here's the text of the slide:

!SLIDE

# programma

![Firefox Window](Firefox-Window.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.