Steven,

When you call eventSource.loadXML(...), just add your code after it:

    tl.loadXML(
        "jfk.xml",
         function(xml, url) {
            eventSource.loadXML(xml, url);

            // right here...
            var trackCount = 
tl.getBand(0).getEventPainter().getLayout().getTrackCount();
            var timelineDiv = ...;
            timelineDiv.style.height = ... + "px";
            tl.layout();
         }
    );

Cheers,

David


Steven Jones wrote:
> Hi,
>
> I'm trying to insert the Timeline widget into a dynamically generated
> website, powered by Drupal. I have the widget on page, and driven from
> the database, but I have a problem. To be able to make the widget the
> correct height, I need to be able to get the number of tracks in the
> bands, but I can't do that until the data is loaded, my question is:
>
> Is there some way of adding a callback to the widget that gets called
> once the widget has loaded the data and rendered itself?
>
>   

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to