laymur 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@ export declare class UIHorizontalProportionConstraint extends UISingleParameterC
55
55
  */
56
56
  set proportion(value: number);
57
57
  /**
58
- * Builds the left-hand side expression for the constraint equation.
58
+ * Builds the right-hand side expression for the constraint equation.
59
59
  *
60
60
  * Creates the expression: (elementA.width * proportion) - elementB.width = 0
61
61
  * This enforces the relationship: elementA.width * proportion = elementB.width
@@ -63,5 +63,5 @@ export declare class UIHorizontalProportionConstraint extends UISingleParameterC
63
63
  * @returns The UIExpression representing the proportional width relationship
64
64
  * @private
65
65
  */
66
- private buildLHS;
66
+ private buildRHS;
67
67
  }
@@ -55,7 +55,7 @@ export declare class UIVerticalProportionConstraint extends UISingleParameterCon
55
55
  */
56
56
  set proportion(value: number);
57
57
  /**
58
- * Builds the left-hand side expression for the constraint equation.
58
+ * Builds the right-hand side expression for the constraint equation.
59
59
  *
60
60
  * Creates the expression: (elementA.height * proportion) - elementB.height = 0
61
61
  * This enforces the relationship: elementA.height * proportion = elementB.height
@@ -63,5 +63,5 @@ export declare class UIVerticalProportionConstraint extends UISingleParameterCon
63
63
  * @returns The UIExpression representing the proportional height relationship
64
64
  * @private
65
65
  */
66
- private buildLHS;
66
+ private buildRHS;
67
67
  }
package/dist/index.js CHANGED
@@ -2905,7 +2905,7 @@ class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
2905
2905
  this._private_a = _private_a;
2906
2906
  this._private_b = _private_b;
2907
2907
  this._private_proportionInternal = options.proportion ?? 1;
2908
- this.constraint = this.solverWrapper.createConstraint(this._private_buildLHS(), new UIExpression(0), this.relationInternal, this.priorityInternal, this.isConstraintEnabled());
2908
+ this.constraint = this.solverWrapper.createConstraint(new UIExpression(0), this._private_buildRHS(), this.relationInternal, this.priorityInternal, this.isConstraintEnabled());
2909
2909
  }
2910
2910
  /**
2911
2911
  * Gets the current proportion value being enforced.
@@ -2921,11 +2921,11 @@ class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
2921
2921
  set proportion(value) {
2922
2922
  if (this._private_proportionInternal !== value) {
2923
2923
  this._private_proportionInternal = value;
2924
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
2924
+ this.solverWrapper.setConstraintRHS(this.constraint, this._private_buildRHS());
2925
2925
  }
2926
2926
  }
2927
2927
  /**
2928
- * Builds the left-hand side expression for the constraint equation.
2928
+ * Builds the right-hand side expression for the constraint equation.
2929
2929
  *
2930
2930
  * Creates the expression: (elementA.width * proportion) - elementB.width = 0
2931
2931
  * This enforces the relationship: elementA.width * proportion = elementB.width
@@ -2933,7 +2933,7 @@ class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
2933
2933
  * @returns The UIExpression representing the proportional width relationship
2934
2934
  * @private
2935
2935
  */
2936
- _private_buildLHS() {
2936
+ _private_buildRHS() {
2937
2937
  return UIExpression.minus(new UIExpression(0, [[this._private_a.wVariable, this._private_proportionInternal]]), new UIExpression(0, [[this._private_b.wVariable, 1]]));
2938
2938
  }
2939
2939
  }
@@ -3102,7 +3102,7 @@ class UIVerticalProportionConstraint extends UISingleParameterConstraint {
3102
3102
  this._private_a = _private_a;
3103
3103
  this._private_b = _private_b;
3104
3104
  this._private_proportionInternal = options.proportion ?? 1;
3105
- this.constraint = this.solverWrapper.createConstraint(this._private_buildLHS(), new UIExpression(0), this.relationInternal, this.priorityInternal, this.isConstraintEnabled());
3105
+ this.constraint = this.solverWrapper.createConstraint(new UIExpression(0), this._private_buildRHS(), this.relationInternal, this.priorityInternal, this.isConstraintEnabled());
3106
3106
  }
3107
3107
  /**
3108
3108
  * Gets the current proportion value being enforced.
@@ -3118,11 +3118,11 @@ class UIVerticalProportionConstraint extends UISingleParameterConstraint {
3118
3118
  set proportion(value) {
3119
3119
  if (this._private_proportionInternal !== value) {
3120
3120
  this._private_proportionInternal = value;
3121
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
3121
+ this.solverWrapper.setConstraintRHS(this.constraint, this._private_buildRHS());
3122
3122
  }
3123
3123
  }
3124
3124
  /**
3125
- * Builds the left-hand side expression for the constraint equation.
3125
+ * Builds the right-hand side expression for the constraint equation.
3126
3126
  *
3127
3127
  * Creates the expression: (elementA.height * proportion) - elementB.height = 0
3128
3128
  * This enforces the relationship: elementA.height * proportion = elementB.height
@@ -3130,7 +3130,7 @@ class UIVerticalProportionConstraint extends UISingleParameterConstraint {
3130
3130
  * @returns The UIExpression representing the proportional height relationship
3131
3131
  * @private
3132
3132
  */
3133
- _private_buildLHS() {
3133
+ _private_buildRHS() {
3134
3134
  return UIExpression.minus(new UIExpression(0, [[this._private_a.hVariable, this._private_proportionInternal]]), new UIExpression(0, [[this._private_b.hVariable, 1]]));
3135
3135
  }
3136
3136
  }