From bb6ec1b0b7b83742f255158f4338181a32fc9080 Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Wed, 8 Jan 2025 19:20:51 +1300 Subject: [PATCH] fixed a bug where layout was order dependent --- clay.h | 1 + 1 file changed, 1 insertion(+) diff --git a/clay.h b/clay.h index 3c0e7d7..0742664 100644 --- a/clay.h +++ b/clay.h @@ -2110,6 +2110,7 @@ void Clay__CompressChildrenAlongAxis(bool xAxis, float totalSizeToDistribute, Cl if (childSize == largestSize) { Clay__int32_tArray_Add(&largestContainers, Clay__int32_tArray_Get(&resizableContainerBuffer, i)); } else if (childSize > largestSize) { + targetSize = largestSize; largestSize = childSize; largestContainers.length = 0; Clay__int32_tArray_Add(&largestContainers, Clay__int32_tArray_Get(&resizableContainerBuffer, i));