elementary/scroller - fix the scroller to locate the current page correctly in case...
authorChunEon Park <hermet@hermet.pe.kr>
Thu, 10 Oct 2013 10:58:01 +0000 (19:58 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Thu, 10 Oct 2013 10:58:42 +0000 (19:58 +0900)
ChangeLog
NEWS
src/lib/elm_interface_scrollable.c

index 7891a1bd9ed1e5c59937515baa87b0fd102677b9..3e9e5b3504aff7e94b57207e22c78478f5cc78a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2013-10-08  Daesung Kim (ad960009)
 
         * ctxpopup : fix elm_object_content_unset didn't unpack content from box
+
+2013-10-10  ChunEon Park (Hermet)
+
+        * scroller : fix the scroller to locate the current page correctly
+        in case that the scroller is suddenly resized and then the drag
+        couldn't capture the page location.
diff --git a/NEWS b/NEWS
index bff325a7cc9127d126df4438c7112772c831b4b2..199215041f92753f6bfd5e6c4c00b423a1353818 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -297,6 +297,7 @@ Fixes:
    * elm_player breaks theme due to poor namespacing
    * elm_popup breaks theme due to poor namespacing
    * ctxpopup: fix elm_object_content_unset didn't unpack content from box
+   * scroller : fix the scroller to locate the current page correctly in case that the scroller is suddenly resized and then the drag couldn't capture the page location.
 
 Removals:
 
index aecb77ff7f2529915308f5216caa3ca6d645c4e7..981ff0095b364ce274a1525f613eae4b39247b4d 100644 (file)
@@ -948,6 +948,13 @@ _elm_scroll_scroll_bar_read_and_update(
    x = _round(vx * (double)mx + minx, 1);
    y = _round(vy * (double)my + miny, 1);
    eo_do(sid->pan_obj, elm_obj_pan_pos_get(&px, &py));
+
+   if (!sid->freeze && _paging_is_enabled(sid))
+     {
+        x = _elm_scroll_page_x_get(sid, x - px, EINA_FALSE);
+        y = _elm_scroll_page_y_get(sid, y - py, EINA_FALSE);
+     }
+
    eo_do(sid->pan_obj, elm_obj_pan_pos_set(x, y));
    if ((px != x) || (py != y))
      {