Fix incorrect culling of multi config scroll containers

This commit is contained in:
Nic Barker 2024-12-19 11:19:34 +13:00
parent 004ed63372
commit 8e53e166de

2
clay.h
View File

@ -2603,7 +2603,7 @@ void Clay__CalculateFinalLayout() {
.id = currentElement->id,
};
bool offscreen = Clay__ElementIsOffscreen(&currentElementBoundingBox, scrollOffset);
bool offscreen = Clay__ElementIsOffscreen(&currentElementBoundingBox, CLAY__INIT(Clay_Vector2) {});
// Culling - Don't bother to generate render commands for rectangles entirely outside the screen - this won't stop their children from being rendered if they overflow
bool shouldRender = !offscreen;
switch (elementConfig->type) {