"touchId", node.touch.id());
return;
}
GestureNode lastNode = _lastNodes.get(node.touch.id());
Point current = node.location();
_lastNodes.put(node.touch.id(), node);
// we haven't moved far enough yet, no further evaluation needed.
Point startLoc = start.location();
if (current.distance(startLoc) < _onAxisThreshold) return;
float offAxisDistance; // distance from our start position in the perpendicular axis
float lastAxisDistance = axisDistance(
lastNode == null ? null : lastNode.location(), current);
if (_direction == Direction.UP || _direction == Direction.DOWN)
offAxisDistance = Math.abs(current.x() - startLoc.x());
else
offAxisDistance = Math.abs(current.y() - startLoc.y());
// if we've strayed outside of the safe zone, or we've backtracked from our last position,
// disqualify
if (offAxisDistance > _offAxisTolerance) setState(State.UNQUALIFIED);
else if (lastAxisDistance < 0) backtracked(node, -lastAxisDistance);