Matthew, This is relatively straightforward to do. Events on the timeline come from the EventSource objects for the timeline. Adding another event to the timeline just requires you to create the Event object, add it to the appropriate EventSource and repaint on the Timeline. (fire the "onAddOne" event for the EventSource). Same thing for removing events from the timeline. Just find the event you want in the EventSource's array of events and remove it from the array.
Example: Suppose tl is my Timeline object and I want to add a new event to the first band: var newEvt = new Timeline.DefaultEventSource.Event(...); // fill in id, start, end, etc tl.getBand(0).getEventSource().add(newEvt); If you want to remember these changes, you'll just need to save your events back to your server/database. A little bit of forms and ajax processing is all it takes, but you'll need to have something on the backend of your server to store it. --Mike On Sep 17, 2009, at 11:01 AM, shyam kumar wrote: > Hi Mathew, > > I had implemented this scenario where the user wants to add / remove > certain events as per his convinience. > For this i have implemented a servlet which is calling by > xmlhttprequest (response will be xml/json) to get what the events > dynamically whatever user wants to display in timeline. > > Hope this helps you to get basic idea.... Its not big trick but its > tedious process.. > > ~Shyam > > On Thu, Sep 17, 2009 at 7:55 PM, matthew > <[email protected]> wrote: > > I am working on web page where the user will be able to add or remove > individual events from a timeline but I'm not sure how to implement > this. I've found code examples where all events are loaded from XML > or JSON but no examples where a single event is added or removed. > > Does this library support this? Can someone point me in the right > direction? > > Thanks for the help > -matthew > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
