X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flib%2Fels_scroller.c;h=484efdb13bf0e5628302e11d249ced317ba1862c;hb=02416fdf5874983611580cfaa34f18d045e92c8d;hp=051c182f331c650bf9c9429e5634af47f28b9ee7;hpb=754b7fd0f5ddf0297cad9ae8b7ea46107daf7c9b;p=framework%2Fuifw%2Felementary.git diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index 051c182..484efdb 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -1847,6 +1847,8 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev sd = data; ev = event_info; sd->down.hold_parent = 0; + sd->down.dx = 0; + sd->down.dy = 0; // if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return ; evas_post_event_callback_push(e, _smart_event_post_up, sd); // FIXME: respect elm_widget_scroll_hold_get of parent container @@ -1898,7 +1900,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev ax /= (i + 1); ay /= (i + 1); at /= (i + 1); - at *= 4.0; // magic number! just trial and error shows this makes it behave "nicer" and not run off at high speed all the time + at /= _elm_config->thumbscroll_sensitivity_friction; dx = ev->canvas.x - ax; dy = ev->canvas.y - ay; if (at > 0) @@ -1970,11 +1972,6 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev } } } - if (sd->down.hold_animator) - { - ecore_animator_del(sd->down.hold_animator); - sd->down.hold_animator = NULL; - } } else { @@ -2031,11 +2028,11 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev if (pgy != y) _smart_scrollto_y(sd, _elm_config->page_scroll_friction, pgy); } } - if (sd->down.hold_animator) - { - ecore_animator_del(sd->down.hold_animator); - sd->down.hold_animator = NULL; - } + } + if (sd->down.hold_animator) + { + ecore_animator_del(sd->down.hold_animator); + sd->down.hold_animator = NULL; } if (sd->down.scroll) {