Эх сурвалжийг харах

Fix issues when using edge insets in an equalTo

The right/bottom edge needed to be inverted to apply a propery "EdgeInsets" rather than "EdgeOffsets" behavior.
Robert Payne 11 жил өмнө
parent
commit
50b365e1e2

+ 2 - 2
Snappy/Constraint.swift

@@ -528,9 +528,9 @@ private extension NSLayoutAttribute {
             } else if self == .Top {
                 return insets.top
             } else if self == .Right {
-                return insets.right
+                return -insets.right
             } else if self == .Bottom {
-                return insets.bottom
+                return -insets.bottom
             }
         }