If the flick distance is more than thumbscroll_flick_distance_tolerance, it become same with thumbscroll_flick_distance_tolerance.

This commit is contained in:
Jaehwan Kim 2013-07-03 19:25:24 +09:00
parent 504f59f174
commit 1c40d6cbab
1 changed files with 20 additions and 8 deletions

View File

@ -2413,17 +2413,29 @@ _elm_scroll_mouse_up_event_cb(void *data,
elm_scrollable_interface_content_viewport_size_get(&vw, &vh));
max_d = _elm_config->thumbscroll_flick_distance_tolerance;
if (dx > 0)
sid->down.dx = (sin((M_PI * (double)dx / max_d)
- (M_PI / 2)) + 1) * max_d / at;
{
if (dx > max_d) dx = max_d;
sid->down.dx = (sin((M_PI * (double)dx / max_d)
- (M_PI / 2)) + 1) * max_d / at;
}
else
sid->down.dx = (sin((M_PI * (double)dx / max_d)
+ (M_PI / 2)) - 1) * max_d / at;
{
if (dx < -max_d) dx = -max_d;
sid->down.dx = (sin((M_PI * (double)dx / max_d)
+ (M_PI / 2)) - 1) * max_d / at;
}
if (dy > 0)
sid->down.dy = (sin((M_PI * (double)dy / max_d)
- (M_PI / 2)) + 1) * max_d / at;
{
if (dy > max_d) dy = max_d;
sid->down.dy = (sin((M_PI * (double)dy / max_d)
- (M_PI / 2)) + 1) * max_d / at;
}
else
sid->down.dy = (sin((M_PI * (double)dy / max_d)
+ (M_PI / 2)) - 1) * max_d / at;
{
if (dy < -max_d) dy = -max_d;
sid->down.dy = (sin((M_PI * (double)dy / max_d)
+ (M_PI / 2)) - 1) * max_d / at;
}
if (((sid->down.dx > 0) && (sid->down.pdx > 0)) ||
((sid->down.dx < 0) && (sid->down.pdx < 0)) ||
((sid->down.dy > 0) && (sid->down.pdy > 0)) ||