Fixed an issue where the selectedItemOffset property did not work correctly for carousels with a single item

This commit is contained in:
Leon Styhre 2025-01-27 17:14:45 +01:00
parent 3510a09d83
commit 4c665f5f1d

View file

@ -948,7 +948,8 @@ template <typename T> void CarouselComponent<T>::render(const glm::mat4& parentT
glm::mat4 itemTrans {carouselTrans}; glm::mat4 itemTrans {carouselTrans};
if (singleEntry) 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 else
itemTrans = glm::translate( itemTrans = glm::translate(
itemTrans, itemTrans,