diff options
author | Umesh Tanwar <umesh.tanwar@samsung.com> | 2015-07-01 11:14:42 +0900 |
---|---|---|
committer | ChunEon Park <hermet@hermet.pe.kr> | 2015-07-01 11:17:22 +0900 |
commit | 7c74c01847e677189638d15930eddb5a2a990c7b (patch) | |
tree | 7104bcf1fd2f7cdb8bbb38b964081e42939b1a11 | |
parent | b7c88ec72d7df71aef8ead5551ab9c9c9b2c4bc5 (diff) | |
download | elementary-7c74c01847e677189638d15930eddb5a2a990c7b.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 872c46cc7..bc8dae698 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -1512,13 +1512,13 @@ _elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Scrollable_Smart_Interfac if (sid->loop_h && cw > 0) { - if (x < 0) x = cw + (x % cw); - else if (x >= cw) x = (x % cw); + if (x < minx) x = mx + (x % mx); + else if (x > mx) x = (x % mx); } if (sid->loop_v && ch > 0) { - if (y < 0) y = ch + (y % ch); - else if (y >= ch) y = (y % ch); + if (y < miny) y = my + (y % my); + else if (y > my) y = (y % my); } if (!_elm_config->thumbscroll_bounce_enable) |