On Aug 9, 1:32 am, Peter <[email protected]> wrote:
> Boy, that really looks it should work, and yet I can't get it to do
> anything on my site (using
> tl.getBand(0).setMinVisibleDate(tl.getBand(0).getMinDate()); ).
>
> Is there some dependency on where I put that javascript function? Does
> it have to be integrated into a local instance of the exhibit scripts,
> or can I just define goStart and goEnd javascript functions in the
> header of my html page? (I'm guessing from your mention of a 'button
> click handler' that this may be an issue...)
>

Doesn't that code simply set the minimum date used by the timeline? I
don't think it will scroll the timeline. I think you want this:

        tl.getBand(0).setCenterVisibleDate(tl.getBand(0).getMinDate());

Assumptions, before calling the above:
 - 'tl' is the name of your timeline object
 - tl is initialised
 - event data is loaded

So, something like (code not tested) this in your start-up code:

        //create the actual Timleine object
        tl = Timeline.create(document.getElementById("tl"), bandInfos,
Timeline.HORIZONTAL);
        // load the event data;
        tl.loadXML("events.xml", function(xml, url)
{ eventSource.loadXML(xml, url); });
        // get the first date
        var minDate = tl.getBand(0).getMinDate()
        // scroll to the first date
        tl.getBand(0).setCenterVisibleDate(tl.getBand(0).getMinDate());

Regards

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to