modules/graphics/src/main/java/com/sun/javafx/tk/quantum/SwipeGestureRecognizer.java
Print this page
*** 111,123 ****
if (absSecondaryDistance > absPrimaryDistance * 0.839 /* tan(2Pi/9) */) {
// too diagonal - in range of 10 degrees
return null;
}
! if (maxSecondaryDeviation > absPrimaryLength / (tracker.getDuration() / 100.0)) {
! // too imprecise for the performed speed (the slower movement,
! // the higher precision requred)
return null;
}
if (absPrimaryLength > absPrimaryDistance * 1.5) {
// too much back and forth
--- 111,126 ----
if (absSecondaryDistance > absPrimaryDistance * 0.839 /* tan(2Pi/9) */) {
// too diagonal - in range of 10 degrees
return null;
}
! if (maxSecondaryDeviation > absPrimaryLength * 1.258 /* tan(2Pi/9) * 1.5 */) {
! return null;
! }
!
! int swipeTimeLimit = Integer.getInteger("com.sun.javafx.gestures.swipe.swipetimelimit", 300);
! if (tracker.getDuration() > swipeTimeLimit) {
return null;
}
if (absPrimaryLength > absPrimaryDistance * 1.5) {
// too much back and forth