laymur 0.2.5 → 0.2.6
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.
package/dist/index.js
CHANGED
|
@@ -2238,8 +2238,6 @@ class UISolverWrapper {
|
|
|
2238
2238
|
*/
|
|
2239
2239
|
var UILayerEvent;
|
|
2240
2240
|
(function (UILayerEvent) {
|
|
2241
|
-
/** Emitted when the layer's orientation is about to change between horizontal and vertical. */
|
|
2242
|
-
UILayerEvent["WILL_ORIENTATION_CHANGE"] = "will_orientation_change";
|
|
2243
2241
|
/** Emitted when the layer's orientation changes between horizontal and vertical. */
|
|
2244
2242
|
UILayerEvent["ORIENTATION_CHANGE"] = "orientation_change";
|
|
2245
2243
|
/** Emitted when the layer's visibility/interaction mode changes. */
|
|
@@ -2349,7 +2347,6 @@ class UILayer extends i {
|
|
|
2349
2347
|
this.sceneWrapper.resize(width, height);
|
|
2350
2348
|
const orientation = width > height ? UIOrientation.HORIZONTAL : UIOrientation.VERTICAL;
|
|
2351
2349
|
if (orientation !== this.orientationInternal) {
|
|
2352
|
-
this.emit(UILayerEvent.WILL_ORIENTATION_CHANGE, this.orientationInternal, this);
|
|
2353
2350
|
this.orientationInternal = orientation;
|
|
2354
2351
|
this.emit(UILayerEvent.ORIENTATION_CHANGE, this.orientationInternal, this);
|
|
2355
2352
|
}
|
|
@@ -2468,11 +2465,6 @@ class UISingleParameterConstraint extends UIConstraint {
|
|
|
2468
2465
|
*/
|
|
2469
2466
|
constructor(layer, priority, relation, orientation) {
|
|
2470
2467
|
super(layer);
|
|
2471
|
-
this._private_onWillOrientationChange = () => {
|
|
2472
|
-
if (!this.isConstraintEnabled()) {
|
|
2473
|
-
this.solverWrapper.setConstraintEnabled(this.constraint, false);
|
|
2474
|
-
}
|
|
2475
|
-
};
|
|
2476
2468
|
/**
|
|
2477
2469
|
* Event handler for layer orientation changes.
|
|
2478
2470
|
*
|
|
@@ -2482,15 +2474,12 @@ class UISingleParameterConstraint extends UIConstraint {
|
|
|
2482
2474
|
* @private
|
|
2483
2475
|
*/
|
|
2484
2476
|
this._private_onOrientationChange = () => {
|
|
2485
|
-
|
|
2486
|
-
this.solverWrapper.setConstraintEnabled(this.constraint, true);
|
|
2487
|
-
}
|
|
2477
|
+
this.solverWrapper.setConstraintEnabled(this.constraint, this.isConstraintEnabled());
|
|
2488
2478
|
};
|
|
2489
2479
|
this.priorityInternal = resolvePriority(priority);
|
|
2490
2480
|
this.relationInternal = resolveRelation(relation);
|
|
2491
2481
|
this.orientationInternal = resolveOrientation(orientation);
|
|
2492
2482
|
this.layer.on(UILayerEvent.ORIENTATION_CHANGE, this._private_onOrientationChange);
|
|
2493
|
-
this.layer.on(UILayerEvent.WILL_ORIENTATION_CHANGE, this._private_onWillOrientationChange);
|
|
2494
2483
|
}
|
|
2495
2484
|
/**
|
|
2496
2485
|
* Gets the current priority level of the constraint.
|
|
@@ -2552,7 +2541,6 @@ class UISingleParameterConstraint extends UIConstraint {
|
|
|
2552
2541
|
*/
|
|
2553
2542
|
destroy() {
|
|
2554
2543
|
this.layer.off(UILayerEvent.ORIENTATION_CHANGE, this._private_onOrientationChange);
|
|
2555
|
-
this.layer.off(UILayerEvent.WILL_ORIENTATION_CHANGE, this._private_onWillOrientationChange);
|
|
2556
2544
|
this.solverWrapper.removeConstraint(this.constraint);
|
|
2557
2545
|
}
|
|
2558
2546
|
/**
|