fixed a bug where layout was order dependent

This commit is contained in:
Nic Barker 2025-01-08 19:20:51 +13:00
parent a11a6ee5a2
commit bb6ec1b0b7

1
clay.h
View File

@ -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));