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

Projects
None yet
2 participants
@joeyates
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@joeyates

joeyates Jun 7, 2015

Contributor

I believe this fixes #154

Contributor

joeyates commented Jun 7, 2015

I believe this fixes #154

@binford2k

This comment has been minimized.

Show comment
Hide comment
@binford2k

binford2k Jun 8, 2015

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@joeyates

joeyates Jun 8, 2015

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@binford2k

binford2k Jun 8, 2015

Contributor

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

Contributor

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

Merge pull request #275 from joeyates/center_after_image_load
Only center slide after images have loaded

@binford2k binford2k merged commit fa2da4c into puppetlabs:master Jun 8, 2015

@joeyates

This comment has been minimized.

Show comment
Hide comment
@joeyates

joeyates Jun 8, 2015

Contributor

Thanks for that.

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

!SLIDE

# programma

![Firefox Window](Firefox-Window.png)
Contributor

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