ScrollView - Increased the angle range for a flick to allow snapping to next snap... 89/24189/1
authorJulien Heanley <j.heanley@partner.samsung.com>
Thu, 26 Jun 2014 12:10:16 +0000 (13:10 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 17:47:40 +0000 (18:47 +0100)
[problem]      Near vertical flick on a ScrollView with only horizontal panning would not result in snapping to next snap point
[cause]        Angle of flick had to be within 60 degrees of the axis to snap on
[solution]     Increased angle to 75 degrees

Change-Id: I5ebc95378a35436f1fc8cabe72b9602061ec4324
Signed-off-by: Julien Heanley <j.heanley@partner.samsung.com>
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp

index 0d37399..d695dea 100644 (file)
@@ -51,7 +51,7 @@ const int DEFAULT_REFRESH_INTERVAL_MILLISECONDS = 50;
 const float FLICK_SPEED_THRESHOLD = 500.0f;                                               ///< Flick threshold in pixels/ms
 const float FREE_FLICK_SPEED_THRESHOLD = 200.0f;                                          ///< Free-Flick threshold in pixels/ms
 const float AUTOLOCK_AXIS_MINIMUM_DISTANCE2 = 100.0f;                                     ///< Auto-lock axis after minimum distance squared.
-const float FLICK_ORTHO_ANGLE_RANGE = 60.0f;                                              ///< degrees. (if >45, then supports diagonal flicking)
+const float FLICK_ORTHO_ANGLE_RANGE = 75.0f;                                              ///< degrees. (if >45, then supports diagonal flicking)
 const unsigned int MAXIMUM_NUMBER_OF_VALUES = 5;                                          ///< Number of values to use for weighted pan calculation.
 const Vector2 DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = Vector2(0.17f, 0.1f); ///< The step of horizontal scroll distance in the proportion of stage size for each mouse wheel event received.
 const unsigned long MINIMUM_TIME_BETWEEN_DOWN_AND_UP_FOR_RESET( 150u );