fix(example): fix lv_example_obj_2 (#5697)

This commit is contained in:
Gabor Kiss-Vamosi
2024-02-20 06:37:30 +01:00
committed by GitHub
parent 616d52a01b
commit e4b5386934

View File

@@ -11,8 +11,8 @@ static void drag_event_handler(lv_event_t * e)
lv_point_t vect;
lv_indev_get_vect(indev, &vect);
int32_t x = lv_obj_get_x(obj) + vect.x;
int32_t y = lv_obj_get_y(obj) + vect.y;
int32_t x = lv_obj_get_x_aligned(obj) + vect.x;
int32_t y = lv_obj_get_y_aligned(obj) + vect.y;
lv_obj_set_pos(obj, x, y);
}