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
pull/413/head
Ziboo 2015-09-30 09:43:45 +00:00
parent 0992ad3df2
commit 8051cb49a4
1 changed files with 1 additions and 1 deletions

View File

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