diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index 63cb21854..07d4ec040 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -243,13 +243,7 @@ void ScrollableContainer::render(const glm::mat4& parentTrans) glm::mat4 trans {parentTrans * getTransform()}; glm::ivec2 clipPos {static_cast(trans[3].x), static_cast(trans[3].y)}; - - glm::vec3 dimScaled {0.0f, 0.0f, 0.0f}; - dimScaled.x = std::fabs(trans[3].x + mSize.x); - dimScaled.y = std::fabs(trans[3].y + mAdjustedHeight); - - glm::ivec2 clipDim {static_cast(dimScaled.x - trans[3].x), - static_cast(dimScaled.y - trans[3].y)}; + glm::ivec2 clipDim {mSize.x, mAdjustedHeight}; // By effectively clipping the upper and lower boundaries of the container we mostly avoid // scrolling outside the vertical starting and ending positions.