From 51d1f3cb1b396d7086c9bdd1eb6a9de6b59a8e12 Mon Sep 17 00:00:00 2001 From: tasn Date: Sun, 13 Feb 2011 14:37:18 +0000 Subject: [PATCH] Elementary els_scroller: Fixed updating of wx/wy/ww/wh with momentum and bounce. Patch by Aharon Hillel. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@56986 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/els_scroller.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index 45fd8d3..5aedbac 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -412,6 +412,12 @@ _smart_momentum_end(Smart_Data *sd) if ((sd->down.bounce_x_animator) || (sd->down.bounce_y_animator)) return; if (sd->down.momentum_animator) { + Evas_Coord px, py; + elm_smart_scroller_child_pos_get(sd->smart_obj, &px, &py); + sd->wx = px; + sd->wy = py; + elm_smart_scroller_child_viewport_size_get(sd->smart_obj, + &sd->ww, &sd->wh); ecore_animator_del(sd->down.momentum_animator); sd->down.momentum_animator = NULL; sd->down.bounce_x_hold = 0; @@ -789,6 +795,10 @@ _smart_momentum_animator(void *data) (no_bounce_x_end && no_bounce_y_end)) { _smart_anim_stop(sd->smart_obj); + sd->wx = x; + sd->wy = y; + elm_smart_scroller_child_viewport_size_get(sd->smart_obj, + &sd->ww, &sd->wh); sd->down.momentum_animator = NULL; sd->down.bounce_x_hold = 0; sd->down.bounce_y_hold = 0; -- 2.7.4