From: Jae Hwan Kim <jae.hwan.kim@samsung.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 Mar 2011 07:34:23 +0000 (07:34 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 Mar 2011 07:34:23 +0000 (07:34 +0000)
If the scroller is stopped and set the freeze push while bounce
animation is running, it will stop bouncing in a moment. Even if the scroller
is set the freeze pop again, the scroller don't finish the bouncing. I think
that it should finish the bouncing when it is set the freeze pop.

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

src/lib/els_scroller.c

index 3b6ab71..5d53cd8 100644 (file)
@@ -1233,6 +1233,8 @@ elm_smart_scroller_freeze_set(Evas_Object *obj, Eina_Bool freeze)
              sd->down.onhold_animator = NULL;
           }
      }
+   else
+     bounce_eval(sd);
 }
 
 void
@@ -1759,8 +1761,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
                          {
                             vel = sqrt((dx * dx) + (dy * dy)) / at;
                             if ((_elm_config->thumbscroll_friction > 0.0) &&
-                                (vel > _elm_config->thumbscroll_momentum_threshold) &&
-                                (!sd->freeze))
+                                (vel > _elm_config->thumbscroll_momentum_threshold))
                               {
                                  sd->down.dx = ((double)dx / at);
                                  sd->down.dy = ((double)dy / at);