onTapTest property

GestureSinglePointCallback onTapTest
final

Called before all gestures (except onHover) as a preliminary test to see who is interested in an event.

All listeners that return true will get the next gesture event.

Any listener that returns false will only get the next gesture event if no one returned true.

This is useful for figuring out who is claiming a gesture event. Example: SelectNearest returns true for onTapTest if the point is within the drawArea. SeriesLegend returns true for onTapTest if the point is within the legend. If the tap occurs in either of those places the corresponding listener. If the tap occurs outside of both targets, then both will be given the event so they can deselect everything in the selection model.

Defaults to function that returns false allowing other listeners to preempt.

Implementation

final GestureSinglePointCallback onTapTest;