Hi, I understand your answer but my problem here is that I want to use a few filters in runtime. My code is going to look something like this 1. use the timeline.getBand(0).getEventPainter().setFilterMatcher to add MyFilter to ALL bands 2. MyFilter will go over a list of registered methods , the registered methods are something that the user adds to a specific band and MyFilter will go over the filters that were registered for this specific band and check whether the registered filters filter out the events
My solution was to have my filter do this work whereas the user simply registers his filter method to a specific band. If there is any way to register a few filters to the same band, then this can also be a solution for me..... And another question regarding what you wrote above:"multiple bands can share one event source" - lets say my bands have different event sources - if I can find a way to reference the eventSource from the event and save on the eventSource its relevant band then it is also a solution- is this correct? I assume I will have the same problem when trying to override the Timeline.OriginalEventPainter.prototype._showBubble only for a certain timeline/band, because the _showBubble has the event object which doesnt indicate the timeline or band , meaning you cannot have different behaviors of the "showBubble" per band/timeline (unless you track these via the eventId), right? Sorry for the long response, I hope I didnt confuse you too much.... On Apr 5, 7:20 pm, Larry Kluger <[email protected]> wrote: > Hi Ora, > > Events are often independent of bands (multiple bands can share one event > source). > > But filters are band-specific. So don't use a filterMatcher for several > bands, use a filterMatcher per band. That way you know what band you're > filtering. > Of course, you can use a second function for common filtering tasks. Eg > > timeline.getBand(0).getEventPainter().setFilterMatcher(filterMatcher0); > timeline.getBand(1).getEventPainter().setFilterMatcher(filterMatcher1); > > function filterMatcher0 (evt) {return commonFilterMatcher(0,evt)} > function filterMatcher1 (evt) {return commonFilterMatcher(1,evt)} > > function commonFilterMatcher(band_index, evt) { > > do filtering here. Return true || false > > } > > Larry > > ________________________________ > From: ora <[email protected]> > To: SIMILE Widgets <[email protected]> > Sent: Sunday, April 5, 2009 1:58:23 AM > Subject: getting a band or a timeline of an event > > Hi Everyone, > > I am trying to find a way to get the band information and timeline > information from an event. > > For example, lets say I have a filterMatcher for several banda, and > now the event is passed to this filter and my filtering depends on the > band that that contains the event, therefore I want to know which band > this event came from. I can obviously manage the filters and bands > somewhere, but I'd rather not, do you know of a way to get the band/ > timeline info from an event on run-time? > > Thanks > Ora --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
