From b1589326d41924292fbc2c62b474dec288bc9da5 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Fri, 2 Jul 2021 10:43:34 -0400 Subject: [PATCH] fix(scroll) fire LV_EVENT_SCROLL_BEGIN in the same spot for both axes --- src/core/lv_obj_scroll.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/lv_obj_scroll.c b/src/core/lv_obj_scroll.c index bd9877b5f6..c0f35178e0 100644 --- a/src/core/lv_obj_scroll.c +++ b/src/core/lv_obj_scroll.c @@ -285,12 +285,11 @@ void lv_obj_scroll_by(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_anim_enable lv_anim_set_values(&a, -sy, -sy + y); lv_anim_set_exec_cb(&a, scroll_y_anim); lv_anim_set_path_cb(&a, lv_anim_path_ease_out); - lv_anim_start(&a); - + lv_res_t res; res = lv_event_send(obj, LV_EVENT_SCROLL_BEGIN, &a); if(res != LV_RES_OK) return; - + lv_anim_start(&a); } } else { /*Remove pending animations*/