From: Jaehwan Kim <jae.hwan.kim@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 26 Oct 2011 05:51:59 +0000 (05:51 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 26 Oct 2011 05:51:59 +0000 (05:51 +0000)
I found a problem in els_scroller. When the scroller is resized, it shows the location of
the coordination which was saved into wanted_coordination. If you don't use the page,
it is no matter. But if you use the page function, the animation of the scroller is operated
by _smart_scrollto_x_animator, not by _smart_momentum_animator.
In _smart_scrollto_x_animator, therer isn't _update_wanted_coordinates. So the value of
wanted_coordination doesn't update. I think _update_wanted_coordinates have to be added in
_smart_scrollto_x_animator and _smart_scrollto_y_animator.
Please check the attached patch file.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64406 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/els_scroller.c

index f774a9c..a769eba 100644 (file)
@@ -458,12 +458,14 @@ _smart_scrollto_x_animator(void *data)
      {
         px = sd->scrollto.x.end;
         elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
+        _update_wanted_coordinates(sd, px, py);
         sd->scrollto.x.animator = NULL;
         if ((!sd->scrollto.y.animator) && (!sd->down.bounce_y_animator))
           _smart_anim_stop(sd->smart_obj);
         return ECORE_CALLBACK_CANCEL;
      }
    elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
+   _update_wanted_coordinates(sd, px, py);
    return ECORE_CALLBACK_RENEW;
 }
 
@@ -548,12 +550,14 @@ _smart_scrollto_y_animator(void *data)
      {
         py = sd->scrollto.y.end;
         elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
+        _update_wanted_coordinates(sd, px, py);
         sd->scrollto.y.animator = NULL;
         if ((!sd->scrollto.x.animator) && (!sd->down.bounce_x_animator))
           _smart_anim_stop(sd->smart_obj);
         return ECORE_CALLBACK_CANCEL;
      }
    elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
+   _update_wanted_coordinates(sd, px, py);
 
    return ECORE_CALLBACK_RENEW;
 }