circle_slider: support drag for out of touch area 59/215159/2
authorBowon Ryu <bowon.ryu@samsung.com>
Wed, 2 Oct 2019 05:52:40 +0000 (14:52 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Wed, 30 Oct 2019 12:48:33 +0000 (21:48 +0900)
when drag a tap, dragging continues even if leave the touch area.

Change-Id: I68057e94f7105e28e81c72748e2d3f6d63986e2a
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/wearable/circle/efl_extension_circle_object_slider.c

index 41efa32be8bce7f15fb5823034c499b693bd864d..64b9609c10874f23e2c6253bc231d27bcd428278 100644 (file)
@@ -345,7 +345,7 @@ _mouse_move_cb(void *data,
 
    if (circle_obj->disabled) return;
 
-   if(widget_data->tap)
+   if (widget_data->tap)
      {
         int gap = sqrt(pow(widget_data->pressed_point.x - ev->cur.canvas.x, 2) + pow(widget_data->pressed_point.y - ev->cur.canvas.y, 2));
         if (gap > elm_config_scroll_thumbscroll_threshold_get())
@@ -361,20 +361,7 @@ _mouse_move_cb(void *data,
      }
 
    if (widget_data->drag)
-     {
-        int radius = eext_circle_object_radius_get(img_obj);
-        Evas_Coord_Point center = {0,0};
-        Evas_Coord x = 0, y = 0, w = 0, h = 0;
-        evas_object_geometry_get(obj, &x, &y, &w, &h);
-
-        center.x = x + w / 2;
-        center.y = y + h / 2;
-
-        int point = sqrt(pow(center.x - ev->cur.canvas.x, 2) + pow(center.y - ev->cur.canvas.y, 2));
-
-        if ((point <= radius) && (point >= (radius - SLIDER_TOUCH_AREA_SIZE)))
-          _angle_drag_set(img_obj, _angle_calculate(obj, ev->cur.canvas.x, ev->cur.canvas.y));
-     }
+     _angle_drag_set(img_obj, _angle_calculate(obj, ev->cur.canvas.x, ev->cur.canvas.y));
 }
 
 static void
@@ -425,9 +412,6 @@ _mouse_out_cb(void *data,
 
    if (circle_obj->disabled) return;
 
-   widget_data->drag = EINA_FALSE;
-   widget_data->tap = EINA_FALSE;
-
    widget_data->pressed_point.x = -1;
    widget_data->pressed_point.y = -1;
 }