interface scroll: handle wanted x coordinates in case of mirroring.
authorAmitesh Singh <amitesh.sh@samsung.com>
Wed, 22 Apr 2015 02:41:41 +0000 (11:41 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 22 Apr 2015 02:41:42 +0000 (11:41 +0900)
Summary:
In case of mirror enabled, wanted x should come from _elm_scroll_x_mirrored_get().
This defect is visible in case of some fancy effects on scroller (map).

@Fix

Reviewers: raster, Hermet

Subscribers: herdsman, sachin.dev, kimcinoo, eagleeye, seoz

Differential Revision: https://phab.enlightenment.org/D2363

src/lib/elm_interface_scrollable.c

index 4a4a988..e52d78e 100644 (file)
@@ -1209,15 +1209,15 @@ _elm_scroll_wanted_coordinates_update(Elm_Scrollable_Smart_Interface_Data *sid,
    eo_do(sid->obj, elm_interface_scrollable_content_viewport_geometry_get
          (NULL, NULL, &sid->ww, &sid->wh));
 
-   if (x < minx)
+   if (x < minx && !sid->is_mirrored)
      {
         if (!sid->loop_h) sid->wx = minx;
         else sid->wx = mx;
      }
-   else if (!sid->loop_h && (x > mx)) sid->wx = mx;
-   else if (sid->loop_h && x >= (sid->ww + mx)) sid->wx = 0;
    else if (sid->is_mirrored)
      sid->wx = _elm_scroll_x_mirrored_get(sid->obj, x);
+   else if (!sid->loop_h && (x > mx)) sid->wx = mx;
+   else if (sid->loop_h && x >= (sid->ww + mx)) sid->wx = 0;
    else sid->wx = x;
 
    if (y < miny)