summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmesh Tanwar <umesh.tanwar@samsung.com>2015-07-01 11:14:42 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-07-01 11:14:42 +0900
commitbba4c217f2ce4f032fca6298cc8b2fc6ff3d7c19 (patch)
tree6a095e7f76810c4caaa5421cf798925fb98efb98
parentd12a08d6368a6f2957aa39d7ec085c8d1d1ea974 (diff)
Elm_Interface_Scrollable: Improvement in looping behavior
Summary: x and y position variable assumes values ranging from min to max. cw, the content width is larger than max in x axis. Beacause of this the scroller is not able to loop in rigth/bottom direction. For looping comparision min and max values should be used instead of content width. @fix Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com> Reviewers: raster, seoz, cedric, Hermet Reviewed By: Hermet Subscribers: eagleeye, SanghyeonLee, singh.amitesh, sachin.dev Differential Revision: https://phab.enlightenment.org/D2731
-rw-r--r--src/lib/elm_interface_scrollable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 4adebcd6c..2c23f00af 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -1515,13 +1515,13 @@ _elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Scrollable_Smart_Interfac
1515 1515
1516 if (sid->loop_h && cw > 0) 1516 if (sid->loop_h && cw > 0)
1517 { 1517 {
1518 if (x < 0) x = cw + (x % cw); 1518 if (x < minx) x = mx + (x % mx);
1519 else if (x >= cw) x = (x % cw); 1519 else if (x > mx) x = (x % mx);
1520 } 1520 }
1521 if (sid->loop_v && ch > 0) 1521 if (sid->loop_v && ch > 0)
1522 { 1522 {
1523 if (y < 0) y = ch + (y % ch); 1523 if (y < miny) y = my + (y % my);
1524 else if (y >= ch) y = (y % ch); 1524 else if (y > my) y = (y % my);
1525 } 1525 }
1526 1526
1527 if (!_elm_config->thumbscroll_bounce_enable) 1527 if (!_elm_config->thumbscroll_bounce_enable)