diff --git a/core/flyout.js b/core/flyout.js index 52027e428..66d5c2c6e 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -1040,7 +1040,9 @@ Blockly.Flyout.prototype.reflowHorizontal = function(blocks) { } // Record the height for .getMetrics_ and .position. this.height_ = flyoutHeight; - Blockly.resizeSvgContents(this.workspace_); + // Call this since it is possible the trash and zoom buttons need + // to move. e.g. on a bottom positioned flyout when zoom is clicked. + this.targetWorkspace_.resize(); } }; @@ -1093,7 +1095,9 @@ Blockly.Flyout.prototype.reflowVertical = function(blocks) { } // Record the width for .getMetrics_ and .position. this.width_ = flyoutWidth; - Blockly.resizeSvgContents(this.workspace_); + // Call this since it is possible the trash and zoom buttons need + // to move. e.g. on a bottom positioned flyout when zoom is clicked. + this.targetWorkspace_.resize(); } };