API / ui/autolayout/layoutrelation
ui/autolayout/layoutrelation
제약 관계 연산자.
Constraint relation operator.
예제Example제약의 관계 읽기Read the relation of a constraint
import { LayoutVariable, LayoutExpression, LayoutRelation } from "./build/vanilla.js";
const width = new LayoutVariable("width");
const widthExpression = LayoutExpression.fromVariable(width);
const constraint = widthExpression.greaterThanOrEqualTo(100);
const relation = constraint.getRelation();
console.log(relation, relation === LayoutRelation.greaterThanOrEqual);LayoutRelationenum
제약 관계 연산자.
- LayoutConstraint 가 표현 == 0, <= 0, >= 0 중 어느 쪽인지 식별.
Constraint relation operator.
- Identifies whether a LayoutConstraint represents == 0, <= 0 or >= 0.
| 이름Name | 값Value | 설명Description |
|---|---|---|
equal | == | 같음. (식 == 0)Equal. (expression == 0) |
lessThanOrEqual | <= | 작거나 같음. (식 <= 0)Less than or equal. (expression <= 0) |
greaterThanOrEqual | >= | 크거나 같음. (식 >= 0)Greater than or equal. (expression >= 0) |