From 33ba6e8fad6f617bb97798e73126486f77c27f23 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Tue, 14 Jun 2016 10:13:03 -0700 Subject: [PATCH] Fix #423 by calling workspace's resize when the flyout reflows. (#430) --- core/flyout.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); } };