Resolved issue whereby the last row in a flow layout group would not size correctly.

Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/357
pull/413/head
Simon Jackson 2022-12-24 13:20:19 +00:00
parent 18ebf8121d
commit e78a2806ed
1 changed files with 2 additions and 2 deletions

View File

@ -225,11 +225,11 @@ namespace UnityEngine.UI.Extensions
if (startAxis == Axis.Horizontal) {
float newOffset = CalculateRowVerticalOffset (groupHeight, offset, currentBarSpace);
currentBarSize -= spacingBetweenElements;
LayoutRow (_itemList, currentBarSize, currentBarSpace, workingSize - (ChildForceExpandWidth ? 0 : spacingBetweenElements), padding.left, newOffset, axis);
LayoutRow (_itemList, currentBarSize, currentBarSpace, workingSize, padding.left, newOffset, axis);
}else if (startAxis == Axis.Vertical) {
float newOffset = CalculateColHorizontalOffset(groupWidth, offset, currentBarSpace);
currentBarSize -= spacingBetweenElements;
LayoutCol(_itemList, currentBarSpace, currentBarSize, workingSize - (ChildForceExpandHeight ? 0 : spacingBetweenElements), newOffset, padding.top, axis);
LayoutCol(_itemList, currentBarSpace, currentBarSize, workingSize, newOffset, padding.top, axis);
}
}