From 7291fa04a96d68986ae281631bb3c8e3385d1669 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 28 Mar 2023 12:47:02 -0700 Subject: [PATCH] fix: mutator not resizing for flyout (#6917) --- core/mutator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/mutator.ts b/core/mutator.ts index 30b613d50..d5a051f52 100644 --- a/core/mutator.ts +++ b/core/mutator.ts @@ -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();