diff --git a/core/mutator.js b/core/mutator.js index 17723b31c..abb1e7cf7 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -272,7 +272,7 @@ Blockly.Mutator.prototype.setVisible = function(visible) { this.rootBlock_.setDeletable(false); if (this.workspace_.flyout_) { var margin = this.workspace_.flyout_.CORNER_RADIUS * 2; - var x = this.workspace_.flyout_.width_ + margin; + var x = this.workspace_.getFlyout_().getWidth() + margin; } else { var margin = 16; var x = margin; @@ -385,9 +385,10 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() { Blockly.Mutator.prototype.getFlyoutMetrics_ = function() { return { viewHeight: this.workspaceHeight_, - viewWidth: this.workspaceWidth_ - this.workspace_.flyout_.width_, + viewWidth: this.workspaceWidth_ - this.workspace_.getFlyout_().getWidth(), absoluteTop: 0, - absoluteLeft: this.workspace_.RTL ? 0 : this.workspace_.flyout_.width_ + absoluteLeft: this.workspace_.RTL ? 0 : + this.workspace_.getFlyout_().getWidth() }; }; diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 28db0d2f2..1d9306eea 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1733,9 +1733,9 @@ Blockly.WorkspaceSvg.prototype.zoomToFit = function() { // Convert from pixels to workspace coordinates. blocksHeight += this.flyout_.height_ / this.scale; } else { - workspaceWidth += this.flyout_.width_; + workspaceWidth += this.flyout_.getWidth(); // Convert from pixels to workspace coordinates. - blocksWidth += this.flyout_.width_ / this.scale; + blocksWidth += this.flyout_.getWidth() / this.scale; } }