frinellkd / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE. Return the height of the timeline #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When multiple events are listed vertically in a horizontal timeline, if the
height of the listed entried is greater than the height of the div element,
the upper band events are displayed in the lower band. Is it possible to
return the full height of the timeline by some function so that I can
change the height of the div element dynamically.

[Submitted by Hiran Ganegedara on simile.mit.edu] 

I use the following to obtain the required height in 'em' of each band
(band 0 shown) and set div.style.height accordingly:

tl.getBand(0).getEventPainter().getLayout().getTrackCount() + 1.5) *
(myTrackHeight +myTrackGap) ) + 'em';

The facvtor 1.5 is a hack to allow for the height of date/time interval
markers but there must be a better way to obtain it. myTrackHeight/Gap are
of course local variables with reqd values.

Original issue reported on code.google.com by GabrielR...@googlemail.com on 6 Apr 2009 at 1:55