Hi Franz,

Looks good to me for Timelines that want to have a "current event" model as 
part of their User Interface. 

Only quick comment is on the addEventCursor method. Is that method called for 
every event? Or just some of them? In either case, the issue to watch out for 
is creating additional listeners for the events. For larger Timelines, an event 
listener per event can really slow things down.

In my project, instead of adding a per-Event listener, I added one listener per 
band, and then used the YUI library YAHOO.util.Event method getTarget to 
resolve the mouse click event to the specific Timeline event being clicked.

Once you've finalized your software, let us know and I'll create a wiki page 
that describes it.
If you'd also like to provide an example file that demonstrates the 
functionality, that'd be great and I'd be happy to add it to the Timeline tree.

Regards,

Larry





________________________________
From: jqueryui-vienna <[email protected]>
To: SIMILE Widgets <[email protected]>
Sent: Monday, January 26, 2009 9:33:47 AM
Subject: Previous/Next Navigation for Timeline


Hi,

I tried to implement sortof "Previous/Next Event" Navigation
functionality by enhancing Timeband and EventSource classes. Here is
my code:

http://pastebin.ca/1318568

Simplest Usage:
Javascript:
//save the javascript from the link above to a js file and embed it
via <script>-tag
//after this line:
mytimeline = Timeline.create(document.getElementById("my-timeline"),
bandInfos);
//you have to add this line to enable navigation for the first
timeband
mytimeline.getBand(0).addEventCursor({show_bubble: true});

HTML:
<!-- add these lines after the timeline div in the html body-->
<button  title="show first event" onclick="mytimeline.getBand
(0).moveToFirstEvent(true);">&lt;&lt;</button>
<button  title="show previous event" onclick="mytimeline.getBand
(0).moveToPreviousEvent(true);">&lt;</button>
<button  title="show next event" onclick="mytimeline.getBand
(0).moveToNextEvent(true);">&gt;</button>
<button  title="show latest event" onclick="mytimeline.getBand
(0).moveToLatestEvent(true);">&gt;&gt;</button>

Your Feedback is highly appreciated!
I will put a more advanced example online once I can spare some
minutes.

Greetings,

Franz



--~--~---------~--~----~------------~-------~--~----~
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