Skip to content

Commit ec17a0e

Browse files
committed
🎨: skip master application after adding morph
1 parent e83a2e2 commit ec17a0e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

lively.morphic/morph.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,11 +1658,13 @@ export class Morph {
16581658
this.makeDirty();
16591659
submorph.resumeSteppingAll();
16601660

1661-
submorph.withAllSubmorphsDo(ea => ea.onOwnerChanged(this));
1661+
submorph.withAllSubmorphsDo(ea => {
1662+
ea.onOwnerChanged(this);
1663+
});
16621664

1663-
if (submorph._requestMasterStyling) {
1664-
submorph.master && submorph.master.applyIfNeeded(true);
1665-
submorph._requestMasterStyling = false;
1665+
if (this.world() && !this.isText) {
1666+
this.env.forceUpdate(this);
1667+
this.withAllSubmorphsDo(m => m.makeDirty());
16661668
}
16671669
});
16681670

lively.morphic/rendering/renderer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ export default class Renderer {
145145
}
146146
}
147147

148+
this.worldMorph.applyLayoutIfNeeded();
149+
148150
// handling these first allows us to assume correct wrapping, when we have submorphs already!
149151
for (let morph of morphsToHandle) {
150152
if (morph.renderingState.hasCSSLayoutChange) this.renderLayoutChange(morph);

0 commit comments

Comments
 (0)