Saad Aziz wrote:
>
> I read in the documentation that it is by default on current load’s
> time and date.
>
> However you could do something like the following:
>
> // A small hack introduced to center on current date, not some static
> value.
>
> * var months=new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun",
> "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");*
>
> * var d=new Date();*
>
> * var dtStamp=months[d.getMonth()]+" "+d.getDate()+"
> "+d.getFullYear()+" 00:00:00 GMT";*
>
> * var tstamp=d.getTime();*
>
> var eventSource = new Timeline.DefaultEventSource();
>
> var bandInfos = [
>
> Timeline.createBandInfo({
>
> showEventText: false,
>
> eventSource: eventSource,
>
> * date: dtStamp,*
>
> width: "10%",
>
> intervalUnit: Timeline.DateTime.WEEK,
>
> intervalPixels: 85,
>
> theme: theme,
>
> trackHeight: 1.5
>
> Note I implemented this into my timeline before reading that in the
> documentation. So I am not sure if that is even necessary, but that’s
> one way of doing it… I am sure there are better ways.
>
> If someone can verify if this is even necessary please let me know?
>
Timeline should automatically center on the current date/time. Take a
look in
http://simile.mit.edu/timeline/api/scripts/timeline.js
and search for "date" (including the quotation marks).
Cheers,
David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general