diff --git a/core/mutator.js b/core/mutator.js index 0f35789f3..b459cab58 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -202,8 +202,7 @@ Blockly.Mutator.prototype.updateEditable = function() { }; /** - * Callback function triggered when the bubble has resized. - * Resize the workspace accordingly. + * Resize the bubble to match the size of the workspace. * @private */ Blockly.Mutator.prototype.resizeBubble_ = function() { @@ -294,6 +293,7 @@ Blockly.Mutator.prototype.setVisible = function(visible) { }; this.block_.workspace.addChangeListener(this.sourceListener_); } + this.resizeBubble_(); // When the mutator's workspace changes, update the source block. this.workspace_.addChangeListener(this.workspaceChanged_.bind(this)); this.updateColour();