From 18ebf8121d3942e34c92ec7105d5ce1441818f39 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Sat, 24 Dec 2022 13:09:26 +0000 Subject: [PATCH] Removed unneeded size calculation which caused some issues with mixed height/width children. Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/380 --- Runtime/Scripts/Layout/FlowLayoutGroup.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Runtime/Scripts/Layout/FlowLayoutGroup.cs b/Runtime/Scripts/Layout/FlowLayoutGroup.cs index bea7412..c5bad45 100644 --- a/Runtime/Scripts/Layout/FlowLayoutGroup.cs +++ b/Runtime/Scripts/Layout/FlowLayoutGroup.cs @@ -166,7 +166,6 @@ namespace UnityEngine.UI.Extensions childSize = LayoutUtility.GetPreferredSize (child, 0); childSize = Mathf.Min (childSize, workingSize); childOtherSize = LayoutUtility.GetPreferredSize (child, 1); - childOtherSize = Mathf.Min (childOtherSize, workingSize); } else if (startAxis == Axis.Vertical) { if (invertOrder) { index = IsRightAlign ? rectChildren.Count - 1 - i : i; @@ -175,7 +174,6 @@ namespace UnityEngine.UI.Extensions childSize = LayoutUtility.GetPreferredSize (child, 1); childSize = Mathf.Min (childSize, workingSize); childOtherSize = LayoutUtility.GetPreferredSize (child, 0); - childOtherSize = Mathf.Min (childOtherSize, workingSize); } // If adding this element would exceed the bounds of the container,