[els_scroller] change for bounce and signal
authorJeahwan Kim <jae.hwan.kim@samsung.com>
Thu, 2 Dec 2010 08:59:11 +0000 (17:59 +0900)
committerJeahwan Kim <jae.hwan.kim@samsung.com>
Thu, 2 Dec 2010 08:59:11 +0000 (17:59 +0900)
src/lib/els_scroller.c

index c576251..7d39442 100644 (file)
@@ -306,7 +306,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;
      }
@@ -371,7 +371,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;
      }
@@ -559,8 +559,9 @@ _smart_bounce_x_animator(void *data)
           {
              if (sd->down.momentum_animator)
                sd->down.bounce_x_hold = 1;
-                        else
-                          _smart_anim_stop(sd->smart_obj);
+             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;
@@ -595,8 +596,9 @@ _smart_bounce_y_animator(void *data)
           {
              if (sd->down.momentum_animator)
                sd->down.bounce_y_hold = 1;
-                        else
-                          _smart_anim_stop(sd->smart_obj);
+             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;
@@ -689,7 +691,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;