From 159888e0590e05c53b2e851d3e4e16fb9f42dddb Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Wed, 27 Jul 2011 09:24:42 +0000 Subject: [PATCH] From: Jaehwan Kim Subject: Re: [E-devel] [Patch] The bounce problem in the scroller. The scroller has a problem when it is scrolled consistently in the end of the edge. It has an acceleration. If the scrolling occur again before the animation end,? the scroll-animation (momentum animation) be faster. When it is in the end of the edge, it does, too. So the content of the scroller disappear because of the acceleration. The scroller don't need to has the acceleration in the end of edge. The below is the problem. http://www.youtube.com/watch?v=Qg7BZrm9EnA And the below is the scroller which be patched. http://www.youtube.com/watch?v=lHT6G9WoNSs SVN revision: 61800 --- legacy/elementary/src/lib/els_scroller.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/els_scroller.c b/legacy/elementary/src/lib/els_scroller.c index aefe9375ca..8339fd1f6c 100644 --- a/legacy/elementary/src/lib/els_scroller.c +++ b/legacy/elementary/src/lib/els_scroller.c @@ -1859,14 +1859,20 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev if ((_elm_config->thumbscroll_friction > 0.0) && (vel > _elm_config->thumbscroll_momentum_threshold)) { + int minx, miny, mx, my, px, py; + sd->pan_func.min_get(sd->pan_obj, &minx, &miny); + sd->pan_func.max_get(sd->pan_obj, &mx, &my); + sd->pan_func.get(sd->pan_obj, &px, &py); sd->down.dx = ((double)dx / at); sd->down.dy = ((double)dy / at); if (((sd->down.dx > 0) && (sd->down.pdx > 0)) || ((sd->down.dx < 0) && (sd->down.pdx < 0))) - sd->down.dx += (double)sd->down.pdx * 1.5; // FIXME: * 1.5 - probably should be config + if (px > minx && px < mx) + sd->down.dx += (double)sd->down.pdx * 1.5; // FIXME: * 1.5 - probably should be config if (((sd->down.dy > 0) && (sd->down.pdy > 0)) || ((sd->down.dy < 0) && (sd->down.pdy < 0))) - sd->down.dy += (double)sd->down.pdy * 1.5; // FIXME: * 1.5 - probably should be config + if (py > miny && py < my) + sd->down.dy += (double)sd->down.pdy * 1.5; // FIXME: * 1.5 - probably should be config if (((sd->down.dx > 0) && (sd->down.pdx > 0)) || ((sd->down.dx < 0) && (sd->down.pdx < 0)) || ((sd->down.dy > 0) && (sd->down.pdy > 0)) ||