Browse Source

Fix edges to edges for macOS

Robert Payne 9 years ago
parent
commit
46c02e3cc9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/Constraint.swift

+ 3 - 1
Source/Constraint.swift

@@ -118,7 +118,9 @@ public class Constraint {
                     layoutToAttribute = layoutFromAttribute
                 }
             #else
-                if layoutToAttributes.count > 0 {
+                if self.from.attributes == self.to.attributes {
+                    layoutToAttribute = layoutFromAttribute
+                } else if layoutToAttributes.count > 0 {
                     layoutToAttribute = layoutToAttributes[0]
                 } else {
                     layoutToAttribute = layoutFromAttribute