From e02ea9712e2ddd8b855876a9d02010f15935279b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 19 Jul 2024 12:28:14 -0500 Subject: [PATCH] put last part in else Signed-off-by: Matt Bruce --- .../TileContainer/TileContainer.swift | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index 131a62f5..0852bca6 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -447,7 +447,7 @@ open class TileContainerBase: Control where Padding widthConstraint?.activate() aspectRatioConstraint = heightAnchor.constraint(equalTo: widthAnchor, multiplier: multiplier) aspectRatioConstraint?.activate() - return + } //------------------------------------------------------------------------- //Height + AspectRatio Constraint - Will exit out if set @@ -460,25 +460,26 @@ open class TileContainerBase: Control where Padding heightConstraint?.activate() aspectRatioConstraint = widthAnchor.constraint(equalTo: heightAnchor, multiplier: multiplier) aspectRatioConstraint?.activate() - return - } - //------------------------------------------------------------------------- - //Width Constraint - //------------------------------------------------------------------------- - if let containerViewWidth, - containerViewWidth > 0 { - widthConstraint?.constant = containerViewWidth - widthConstraint?.activate() - } - - //------------------------------------------------------------------------- - //Height Constraint - //------------------------------------------------------------------------- - if let containerViewHeight, - containerViewHeight > 0 { - heightConstraint?.constant = containerViewHeight - heightConstraint?.activate() + } else { + + //------------------------------------------------------------------------- + //Width Constraint + //------------------------------------------------------------------------- + if let containerViewWidth, + containerViewWidth > 0 { + widthConstraint?.constant = containerViewWidth + widthConstraint?.activate() + } + + //------------------------------------------------------------------------- + //Height Constraint + //------------------------------------------------------------------------- + if let containerViewHeight, + containerViewHeight > 0 { + heightConstraint?.constant = containerViewHeight + heightConstraint?.activate() + } } }