fix: mutator not resizing for flyout (#6917)

This commit is contained in:
Beka Westberg
2023-03-28 12:47:02 -07:00
committed by GitHub
parent c688c9382b
commit 7291fa04a9

View File

@@ -367,7 +367,9 @@ export class Mutator extends Icon {
}
this.resizeBubble();
// When the mutator's workspace changes, update the source block.
ws.addChangeListener(this.workspaceChanged.bind(this));
const boundListener = this.workspaceChanged.bind(this);
ws.addChangeListener(boundListener);
if (flyout) flyout.getWorkspace().addChangeListener(boundListener);
// Update the source block immediately after the bubble becomes visible.
this.updateWorkspace();
this.applyColour();