From 4c665f5f1dbc6985887a20fe2141475408e8b29b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 27 Jan 2025 17:14:45 +0100 Subject: [PATCH] Fixed an issue where the selectedItemOffset property did not work correctly for carousels with a single item --- es-core/src/components/primary/CarouselComponent.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/primary/CarouselComponent.h b/es-core/src/components/primary/CarouselComponent.h index 8f225591c..cda153a83 100644 --- a/es-core/src/components/primary/CarouselComponent.h +++ b/es-core/src/components/primary/CarouselComponent.h @@ -948,7 +948,8 @@ template void CarouselComponent::render(const glm::mat4& parentT glm::mat4 itemTrans {carouselTrans}; if (singleEntry) - itemTrans = glm::translate(carouselTrans, glm::vec3 {xOff, yOff, 0.0f}); + itemTrans = glm::translate(carouselTrans, glm::vec3 {xOff + itemHorizontalOffset, + yOff + itemVerticallOffset, 0.0f}); else itemTrans = glm::translate( itemTrans,