Timeline: How to put text in tape and decrease the trackHeight properly. Also PointHighlightDecorator question.

32 views
Skip to first unread message

Remy Alidarso

unread,
Mar 1, 2012, 9:45:51 AM3/1/12
to simile-...@googlegroups.com
Hi!

I have a very large file which I would like to view in the Simile Timeline. This makes the timeline look very crowded. Creating hotzones will not work, because many events start on the same date. I have already put the event-label in the event-tape with some css and javascript sorcery, but I am unable to decrease the spacing between tracks (timeline.event.track.height). (Because of the css and javascript adjustments, the script thinks there still is some element in the spacing, so it won't collapse). I have found the code that is responsible for _painting_ the labels and events, but I think adjusting this may have been done too 'hackery', so that might have sturred up some internal code. I also found the code in detailed-painter (and the equivalent code in the bundle) for calculating the trackOffset and trackIncrements, but adjusting that did not work either (probably because it stores somewhere else the height properties).

So the bottom-line question is: Where do I change the code that calculates (and thus automatically paints) where the labels should be on the tape, so I can properly use timeline.event.track.height. 

Second question is about the PointHighlightDecorator. I am unable to get a PointHighlightDecorator on the present day, even though it looks like a piece of cake in the examples. 

I am using the same code as below:

    for ( var i = 0; i < bandInfos.length; i++ ) {
        bandInfos[i].decorators = new Timeline.PointHighlightDecorator({
            date:       new Date().toLocaleString(),
            color:      "#00FF00",
            width:      5,
            opacity:    30
        });
    }

But I am not getting any errors or anything, so I have no clue where to look. 

Regards, Remy
Reply all
Reply to author
Forward
0 new messages