Closed GoogleCodeExporter closed 8 years ago
Original comment by larryklu...@gmail.com
on 7 Oct 2008 at 3:56
See new event attribute trackNum
Note that using this attribute turns off automatic placement of the events on
the
Timeline. Warning: Using this attribute enables you to easily be able to
overlap
event tapes and labels. (Not usually considered a good thing.)
Original comment by larryklu...@gmail.com
on 2 Nov 2008 at 3:40
Committed in rev 1654.
Not tested: will leave that to the folks who asked for the change.
Original comment by larryklu...@gmail.com
on 2 Nov 2008 at 5:41
This is looking good, thanks!
Is there some way to find out or control the number of tracks per band?
Original comment by mpelzshe...@gmail.com
on 3 Nov 2008 at 11:21
The number of tracks depends on the "width" of the band, in pixels. The
"width", for
horizontal Timelines is the div's height. Since you set the "width" of the band
(width attribute fed to Timeline.createBandInfo or
Timeline.createHotZoneBandInfo),
it is up to you.
You can calculate the number of tracks that will fit in a given number of
pixels:
(band "width") / (theme.event.track.height + theme.event.track.gap)
The divisor is from the theme file, unless overwritten by your client sw.
Original comment by larryklu...@gmail.com
on 4 Nov 2008 at 4:46
In my project I'm finding that I can only fit a bit over half of this number.
The formula that's working for me is as follows:
(band width * .55) / (theme.event.track.height + theme.event.track.gap)
Original comment by mpelzshe...@gmail.com
on 4 Nov 2008 at 7:31
Hmmm. Interesting. Have you varied the tape height from the default? Is your
label
font extra large? Using the original-painter?
The original-painter expects that the total height of a track, including the
label,
will be theme.event.track.height. So rather than using a scaling factor, I'd
suggest
figuring out what is really happening--perhaps you need to increase the track
height.
You could test by increasing track height and seeing if your timeline increases
its
"width." If it does NOT, then you'll know that the old track height was smaller
than
the reality. Or use a developer's helper with FF to see exactly how high your
tracks
are.
I also know that in most circumstances the right track count calculation does
not
require any scaling factors since I use the same calculation for automatically
setting the Timeline's width. And that works well with no overlaps, big gaps,
etc.
See example2 which includes autoWidth calculation.
Regards,
Larry
Original comment by larryklu...@gmail.com
on 4 Nov 2008 at 9:08
Thanks for the help!
I'm not doing any of those things you mentioned; just using the ClassicTheme.
The images I'm using for markers
are custom but they are 10x10px.
According to Firefox, my tracks are 14px high with an offset of 6px. If I use a
track height of 20 instead of (theme.event.track.height +
theme.event.track.gap) (which is 12 for me), I don't have to use the scaling
factor.
Original comment by mpelzshe...@gmail.com
on 4 Nov 2008 at 10:43
I can't seem to get the "trackNum" parameter to work. could someone provide an
example code snippet in JSON format to demonstrate its use to me?
thanks,
bill
Original comment by proff...@gmail.com
on 25 Nov 2008 at 7:33
Original issue reported on code.google.com by
mpelzshe...@gmail.com
on 29 Sep 2008 at 4:00