> I would like for the very first bubble to automatically display when
> the page is loaded.
> I have looked around and don't see what I should be editing.
> If you have any input on what it would take to do this, please let me
> know.
>
> Thank you very much!
Here's how to get Timeline to automatically show the bubble for the first event
when the Timeline loads:
Once you are done loading your events, you can tell Timeline to show the bubble
for the first event. If you are loading events via ajax, you'll have to wait
for the XHR to return and for Timeline to process the events. You can add this
function to your loadJSON callback.
Let's assume you have a simple timeline with one band:
function showFirstBubble(tl) {
var band = tl.getBand(0);
var firstEvent = band.getEventSource().getAllEventIterator().next();
band.setCenterVisibleDate(firstEvent.getStart());
band.getEventPainter().showBubble(firstEvent);
}
This will find the first event, scroll the timeline to it and show the bubble.
If you initialize your timeline to another date, then you'll need to decide
which event you want to be "first". For example, in the JFK Timeline, the first
event in the dataset is the Bay of Pigs Invasion, but the Timeline is
initialized at the time of JFK's death.
Let me know if this works for you.
--Mike
--
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.