John, What are you trying to make Timeline do? It would help if I understood what you were trying to accomplish. Attaching listeners to each individual event is expensive to do, and can cause performance problems if done incorrectly.
Timeline does support the ability to add listeners to the individual events - the onSelectListener gets fired when you click on an event and the eventPaintListeners get fired when the Timeline .paint() is called. Because of the expense of adding listeners, and the potential for having to fire too many listeners, or check too many events, you might look at using event delegation instead. Set a scroll listener on a band and let it decide what to do based on the time and events shown. I'm not sure what you mean by having the server side script generate loading calls for you. Better to have the server provide the data necessary for your event loading, and use the client side javascript to load that data. Keeps things cleaner and easier to maintain if you ever need to change formats, load order, etc. --Mike On Jul 11, 2011, at 5:13 PM, John S wrote: > I've been hunting around for this, but I haven't been able to find > anything yet, and I wanted to see if anyone else had any suggestions > for a good way to do this. > > I'm currently loading everything dynamically with JSON calls, and > setting a custom class for each item. (these calls are being generated > from a server side script that's writing the loading calls for me, so > the names are something like, "event26" where the 26 is the event ID > in the database.) > > Because of the way I'm doing this I can attach a listener to each > event individually, based on the unique class names, but I'm just not > sure what to look for as the trigger of the listener. I'd like to have > the listener trigger whenever the labels become "visible". I know > thats a vague way to describe a trigger, but that's half my problem of > coming up with a better plan of attack. > > If anyone has any ideas on how I could go about doing this, it would > be a serious help! I don't even need the specific code, just a push in > the right direction should be enough for me to go on. > > -- > 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. > -- 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.
