Elementary map: fix pinch zoom resolution & zoom timing issue
authorgouache <gouache@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 May 2011 01:54:01 +0000 (01:54 +0000)
committergouache <gouache@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 May 2011 01:54:01 +0000 (01:54 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@59335 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_map.c

index 847ab75..097760e 100644 (file)
@@ -1759,8 +1759,8 @@ _mouse_multi_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__
              tt = wd->pinch.diff;
              wd->pinch.diff = (double)(ev->pinch_dis - ev->pinch_start_dis);
              t = (wd->pinch.diff * 0.01) + 1.0;
-             if ((!wd->zoom) || ((wd->zoom + (int)t - 1) <= wd->src->zoom_min) ||
-                 ((wd->zoom + (int)t - 1) >= wd->src->zoom_max) ||
+             if (((wd->zoom + (int)t - 1) < wd->src->zoom_min) ||
+                 ((wd->zoom + (int)t - 1) > wd->src->zoom_max) ||
                  (t > PINCH_ZOOM_MAX) || (t < PINCH_ZOOM_MIN))
                {
                   wd->pinch.diff = tt;
@@ -3135,7 +3135,6 @@ elm_map_add(Evas_Object *parent)
    idnum++;
 
    wd->tsize = 256;
-
    edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr),
                              &minw, &minh);
    evas_object_size_hint_min_set(obj, minw, minh);
@@ -3143,6 +3142,11 @@ elm_map_add(Evas_Object *parent)
    wd->sep_maps_markers = evas_object_rectangle_add(evas_object_evas_get(obj));
    evas_object_smart_member_add(wd->sep_maps_markers, wd->pan_smart);
 
+   wd->paused = EINA_TRUE;
+   elm_map_zoom_set(obj, 0);
+   wd->paused = EINA_FALSE;
+   _sizing_eval(obj);
+
    // TODO: convert Elementary to subclassing of Evas_Smart_Class
    // TODO: and save some bytes, making descriptions per-class and not instance!
    evas_object_smart_callbacks_descriptions_set(obj, _signals);
@@ -3152,9 +3156,6 @@ elm_map_add(Evas_Object *parent)
         ERR("Ecore must be built with curl support for the map widget!");
      }
 
-   elm_map_zoom_set(obj, 0);
-   _sizing_eval(obj);
-
    return obj;
 }