Stop getting two gesture events from one gesture
On a screen, I use the function handleGestureEvent. Inside this function, I have an if-else to differentiate between horizontal and vertical swipes:
void handleGestureEvent(const GestureEvent& event)
{
if (event.getType() == GestureEvent::SWIPE_HORIZONTAL)
{
/* ... */
}
else if (event.getType() == GestureEvent::SWIPE_VERTICAL)
{
/* ... */
}
}(Could be else instead of else if, but for clarity...)
The problem is that from many swipes I get two gesture events: one horizontal and one vertical, both with the same x- and y-coordinates. I.e. handleGestureEvent is called, the if-branch is activated, then the function is called again and the else-branch is activated. event.getX() and event.getY() yield the same value in both calls.
I have neither found a possibility to set the thresholds for detecting a gesture as vertical or horizontal nor have I found the implementation oft registerDragEvent.
I use TouchGFX Designer 4.20.0.
