Hello,
The following javascript works for me. It filters everything out of the
first band which does not contain the text "voie".
tl.getBand(0).getEventPainter().setFilterMatcher(function(evt) {
return /voie/.test(evt.getText());
});
tl.paint();
Modify this as you need and use as your link target (or better put it in
a function that you can call from the link). As an explanation: You seem
to pass "voie" directly to setFilterMatcher. This does not work;
setFilterMatcher takes as argument a function. This function can look at
each event and return true or false, depending on whether the event
should be displayed or not.
I think you'll need some javascript programming to perform filtering
like this... my example above uses inline functions and regular
expressions, both of which can be confusing if you don't have a
programming background. Maybe there are more also more complete examples
out there than mine. See e.g. [1]
Hope this helps,
Jonas
[1]
http://code.google.com/p/simile-widgets/wiki/Timeline_multiple_filter_boxes
loyo wrote:
> Hello (bis)
>
> I want to have to "static filter", like links under the timeband.
>
> I try using the "function" : "setFilterMatcher" like that :
>
>
> <td><a href="javascript:setFilterMatcher(voie);">filtre 1</a></td>
>
> but it doesn't work
>
> I hope someone can help me :)
>
> http://www.classicalphila.com/test/timelinemultiple1.htm
>
> Thanks :)
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---