From e38b01b52e8d08ca0cf93ca47bcdce9ad3d4f82a Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Tue, 20 Sep 2016 17:11:30 +1200 Subject: [PATCH] Fix up leading and trailing with UIEdgeInsets --- Source/ConstraintConstantTarget.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/ConstraintConstantTarget.swift b/Source/ConstraintConstantTarget.swift index 8a32519..801bb79 100644 --- a/Source/ConstraintConstantTarget.swift +++ b/Source/ConstraintConstantTarget.swift @@ -107,9 +107,9 @@ extension ConstraintConstantTarget { case .bottom, .bottomMargin: return -value.bottom case .leading, .leadingMargin: - return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : -value.right + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right case .trailing, .trailingMargin: - return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.right : -value.left + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left case .width: return -(value.left + value.right) case .height: @@ -128,9 +128,9 @@ extension ConstraintConstantTarget { case .bottom: return -value.bottom case .leading: - return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : -value.right + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right case .trailing: - return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.right : -value.left + return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left case .width: return -(value.left + value.right) case .height: