MinnPost / jquery-vertical-timeline

jQuery plugin of: A beautiful vertical timeline made with Tabletop.js, Isotope.js & Handerlbarz.js. A collaboration between Balance Media and WNYC/John Keefe.
http://code.minnpost.com/jquery-vertical-timeline/
Other
122 stars 27 forks source link

Timeline doesn't fit to lightbox width #10

Closed robroc closed 10 years ago

robroc commented 10 years ago

When opening vertical-timeline in a Fancybox lightbox, it appears squished to a narrow container, not expanding to container width. Example here: http://gazdata-assets.s3.amazonaws.com/timeline-test.html

zzolo commented 10 years ago

Hey @robroc, thanks for the issues.

It's a bit hard to debug without creating a local copy, but what I imagine is happening is that the width of the timeline container is very small or nothing when the timeline gets rendered.

So, there a few things to try.

Let me know how that works out.

robroc commented 10 years ago

Thank you @zzolo for the quick response. I can tell you right away that changing handleResize did not work. Seems like this is more of a Fancybox issue, then.

zzolo commented 10 years ago

Hey @robroc, I downloaded the example locally and played around with it. I could not get it to work exactly how you would want.

The best I could do is set the width to a pixel value on the timeline, width: 800px. This kind of screws up responsiveness.

I still think what is happening is that the iframe is loaded and the timeline is displayed while the fancybox is still too small. What would be ideal is to somehow manually make a fancbox and then load up the iframe in it. I am not sure if and how to do this with fancybox but there may be a way.