[scroller] fix the wrong position - it is patched in SVN
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Fri, 11 Mar 2011 04:17:08 +0000 (13:17 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Fri, 11 Mar 2011 04:17:08 +0000 (13:17 +0900)
Change-Id: I0687081391d1b9c1e9aaa346464f0f8db881dcbe

src/lib/els_scroller.c

index 9cefb18..95b2dea 100644 (file)
@@ -1022,7 +1022,13 @@ _elm_smart_scroller_child_region_show_internal(Evas_Object *obj, Evas_Coord x, E
         sd->down.pdx = 0;
         sd->down.pdy = 0;
      }
-   elm_smart_scroller_child_pos_set(sd->smart_obj, nx, ny);
+   x = nx;
+   if (x < minx) x = minx;
+   else if ((x + w) > cw) x = cw - w;
+   y = ny;
+   if (y < miny) y = miny;
+   else if ((y + h) > ch) y = ch - h;
+   elm_smart_scroller_child_pos_set(obj, x, y);
 }
 
 /* Set should be used for calculated positions, for example, when we move