From 8051cb49a43e537d932df7f6c8571adcc6bd39aa Mon Sep 17 00:00:00 2001 From: Ziboo Date: Wed, 30 Sep 2015 09:43:45 +0000 Subject: [PATCH] FlowLayoutGroup.cs edited online with Bitbucket It seems to have a bug on the last row, elements go out of bounds on the right, I think I fixed it by removing "SpacingX" of the "workingWidth" on the last row. Line 168 --HG-- branch : Ziboo/flowlayoutgroupcs-edited-online-with-bit-1443606102163 --- Scripts/Layout/FlowLayoutGroup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Layout/FlowLayoutGroup.cs b/Scripts/Layout/FlowLayoutGroup.cs index 3d4c050..00ff0c9 100644 --- a/Scripts/Layout/FlowLayoutGroup.cs +++ b/Scripts/Layout/FlowLayoutGroup.cs @@ -165,7 +165,7 @@ namespace UnityEngine.UI.Extensions var h = CalculateRowVerticalOffset(groupHeight, yOffset, currentRowHeight); currentRowWidth -= SpacingX; // Layout the final row - LayoutRow(_rowList, currentRowWidth, currentRowHeight, workingWidth, padding.left, h, axis); + LayoutRow(_rowList, currentRowWidth, currentRowHeight, workingWidth - SpacingX, padding.left, h, axis); } _rowList.Clear();