From ecf5dd8b2a79343e0be9df46d3ba75a738f234e2 Mon Sep 17 00:00:00 2001 From: Jae Hwan Kim Date: Tue, 7 Dec 2010 05:18:01 +0000 Subject: [PATCH] From: Jae Hwan Kim Subject: Re: [E-devel] [PATCH] els_scroller els_scroller has some problems. First, when the function "elm_scroller_page_size_set" is used and the scroller is bounced, the signal "scroll,anim,stop" is not called. Second, the signal "scroll,anim,stop" is called at the time "ELM_THUMBSCROLL_FRICTION", even if the animation of scroller end before the time. So I changed the code "els_scroller.c". Patch code is the following. SVN revision: 55341 --- src/lib/els_scroller.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index 131406e..eb248eb 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -311,7 +311,7 @@ _smart_scrollto_x_animator(void *data) px = sd->scrollto.x.end; elm_smart_scroller_child_pos_set(sd->smart_obj, px, py); sd->scrollto.x.animator = NULL; - if (!sd->scrollto.y.animator) + if ((!sd->scrollto.y.animator) && (!sd->down.bounce_y_animator)) _smart_anim_stop(sd->smart_obj); return ECORE_CALLBACK_CANCEL; } @@ -376,7 +376,7 @@ _smart_scrollto_y_animator(void *data) py = sd->scrollto.y.end; elm_smart_scroller_child_pos_set(sd->smart_obj, px, py); sd->scrollto.y.animator = NULL; - if (!sd->scrollto.x.animator) + if ((!sd->scrollto.x.animator) && (!sd->down.bounce_x_animator)) _smart_anim_stop(sd->smart_obj); return ECORE_CALLBACK_CANCEL; } @@ -530,6 +530,9 @@ _smart_bounce_x_animator(void *data) { if (sd->down.momentum_animator) sd->down.bounce_x_hold = 1; + else if ((!sd->down.bounce_y_animator) && + (!sd->scrollto.y.animator)) + _smart_anim_stop(sd->smart_obj); sd->down.bounce_x_animator = NULL; sd->down.pdx = 0; sd->bouncemex = 0; @@ -564,6 +567,9 @@ _smart_bounce_y_animator(void *data) { if (sd->down.momentum_animator) sd->down.bounce_y_hold = 1; + else if ((!sd->down.bounce_x_animator) && + (!sd->scrollto.y.animator)) + _smart_anim_stop(sd->smart_obj); sd->down.bounce_y_animator = NULL; sd->down.pdy = 0; sd->bouncemey = 0; @@ -657,7 +663,7 @@ _smart_momentum_animator(void *data) y = py; } elm_smart_scroller_child_pos_set(sd->smart_obj, x, y); - if (dt >= 1.0) + if (dt >= 1.0 || ((sd->down.bounce_x_hold) && (sd->down.bounce_y_hold))) { _smart_anim_stop(sd->smart_obj); sd->down.momentum_animator = NULL; -- 2.7.4