Skip to content

Commit 394c07f

Browse files
committed
tolerance for extend validations (size, width, height)
1 parent c9406a5 commit 394c07f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/itarray/automotion/internal/UIElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public boolean hasEqualBottomOffsetAs(UIElement other) {
152152
private <V extends MetricSpace<V>> boolean hasEqualExtendAs(UIElement other, ExtendGiving<V> direction, Context context) {
153153
Expression<Boolean> equal = Expression.equalTo(
154154
ElementPropertyExpression.extend(direction, this),
155-
ElementPropertyExpression.extend(direction, this));
156-
return getExtend(direction).equals(other.getExtend(direction));
155+
ElementPropertyExpression.extend(direction, other));
156+
return equal.evaluateIn(context, direction);
157157
}
158158

159159
public boolean hasSameWidthAs(UIElement other, Context context) {

0 commit comments

Comments
 (0)