|
7 | 7 | import net.itarray.automotion.internal.geometry.Rectangle; |
8 | 8 | import net.itarray.automotion.internal.geometry.Scalar; |
9 | 9 | import net.itarray.automotion.internal.geometry.Vector; |
| 10 | +import net.itarray.automotion.internal.properties.ConstantExpression; |
10 | 11 | import net.itarray.automotion.internal.properties.Context; |
11 | 12 | import net.itarray.automotion.tools.general.SystemHelper; |
12 | 13 | import net.itarray.automotion.tools.helpers.TextFinder; |
@@ -223,11 +224,11 @@ private static String getShortenedText(String text) { |
223 | 224 |
|
224 | 225 | public boolean contains(UIElement other, Context context) { |
225 | 226 | return |
226 | | - Condition.lessOrEqualTo(other.getLeft()).isSatisfiedOn(getLeft(), context, RIGHT) && |
227 | | - Condition.lessOrEqualTo(getRight()).isSatisfiedOn(other.getRight(), context, RIGHT) && |
228 | | - Condition.lessOrEqualTo(other.getTop()).isSatisfiedOn(getTop(), context, DOWN) && |
229 | | - Condition.lessOrEqualTo(getBottom()).isSatisfiedOn(other.getBottom(), context, DOWN); |
230 | | - } |
| 227 | + Condition.lessOrEqualTo(other.end(LEFT)).applyTo(end(LEFT)).evaluateIn(context, RIGHT) && |
| 228 | + Condition.lessOrEqualTo(end(RIGHT)).applyTo(other.end(RIGHT)).evaluateIn(context, RIGHT) && |
| 229 | + Condition.lessOrEqualTo(other.end(UP)).applyTo(end(UP)).evaluateIn(context, DOWN) && |
| 230 | + Condition.lessOrEqualTo(end(DOWN)).applyTo(other.end(DOWN)).evaluateIn(context, DOWN); |
| 231 | +} |
231 | 232 |
|
232 | 233 | public void validateLeftAlignedWith(UIElement element, Context context) { |
233 | 234 | validateEqualEnd(LEFT, element, context); |
|
0 commit comments