Follow

Time-interval divs not showing

I have successully tried TimelineJS using both the iframe and the inline methods.

Since the iframes do not allow the use of hash bookmarks I decided to go with the inline method (https://github.com/NUKnightLab/TimelineJS#using-inline-easiest).

However, the problem is that the dates at the horizontal axis are hidden. Searching the css, I found that these are in divs controlled by classes time-interval-major (for the larger font date, line 325 of timeline.css) and time-interval (for the smaller font date, line 317 of timeline.css). They are there, but they need to be made visible by hacking the css. In particular the "top" attribute must be set from 5px to about -13px for time-interval-major and to about -2px for time-interval.

This is caused by the fact that while the height is set at 650px, the timeline-embed div is set to a height of 634px.

Without ANY knowledge of javascript or the code at hand, I suspect  that this stems from a function dealing with the height:

r.setAttribute("id",h.id);if(h.width.toString().match("%"))i.style.width=h.width.split("%")[0]+"%";else{h.width=h.width-2;i.style.width=h.width+"px"}if(h.height.toString().match("%")){i.style.height=h.height;e+=" full-embed";i.style.height=h.height.split("%")[0]+"%"}else if(h.width.toString().match("%")){e+=" full-embed";h.height=h.height-16;i.style.height=h.height+"px"}else{e+=" sized-embed";h.height=h.height-16;i.style.height=h.height+"px"}i.setAttribute("class",e);i.setAttribute("className",e);

Since 634 = 650 - 16, have I found a bug, or am I missing something?

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk