diff --git a/lively.morphic/layout.js b/lively.morphic/layout.js index a0ac44f91a..cef6c8ed70 100644 --- a/lively.morphic/layout.js +++ b/lively.morphic/layout.js @@ -389,7 +389,6 @@ export class TilingLayout extends Layout { attach () { this.initializeResizePolicies(); super.attach(); - this.measureAfterRender(this.container); // no longer needed with yoga?? } initializeResizePolicies (_initializingPoliciesAfterwards = false) { @@ -1785,8 +1784,7 @@ export class ConstraintLayout extends Layout { } if (change.prop === 'extent' && !change.value.equals(change.prevValue)) { - if (change.meta?.isLayoutAction) this.measureAfterRender(submorph); - else { + if (!change.meta?.isLayoutAction) { let config = this._morphConfigurations?.get(submorph); if (config) { this.adjustConfigViaExtentDelta(config, change.value.subPt(change.prevValue), submorph); @@ -1796,8 +1794,7 @@ export class ConstraintLayout extends Layout { } if (change.prop === 'position' && !change.value.equals(change.prevValue)) { - if (change.meta?.isLayoutAction) this.measureAfterRender(submorph); - else { + if (!change.meta?.isLayoutAction) { let config = this._morphConfigurations?.get(submorph); if (config) { this.adjustConfigViaPositionDelta(config, change.value.subPt(change.prevValue), submorph); diff --git a/lively.morphic/tests/layout-test.js b/lively.morphic/tests/layout-test.js index fe84fa47bb..59a5731bd7 100644 --- a/lively.morphic/tests/layout-test.js +++ b/lively.morphic/tests/layout-test.js @@ -156,9 +156,7 @@ describe('layout', () => { ] }); world.addMorph(m1); - expect(!!m1.renderingState.cssLayoutToMeasureWith).not.to.be.false; env.forceUpdate(); - expect(!!m1.renderingState.cssLayoutToMeasureWith, 'all layouts have finished measuring').to.be.false; expect(m1.width).to.equal(m2.width + m3.width + 3 * padDist); expect(m1.height).to.equal(m1.submorphBounds().height + m1.layout.padding.top() + m1.layout.padding.bottom()); expect(m1.width).to.equal(m1.submorphBounds().width + m1.layout.padding.left() + m1.layout.padding.right());