Merge pull request #1453 from microsoftsam/develop

Fix positioning of right aligned Flyout buttons when workspace is scaled
This commit is contained in:
Rachel Fenichel
2017-11-16 10:39:56 -08:00
committed by GitHub

View File

@@ -365,7 +365,7 @@ Blockly.VerticalFlyout.prototype.reflowInternal_ = function() {
// With the flyoutWidth known, right-align the buttons.
for (var i = 0, button; button = this.buttons_[i]; i++) {
var y = button.getPosition().y;
var x = flyoutWidth - button.width - this.MARGIN -
var x = flyoutWidth / this.workspace_.scale - button.width - this.MARGIN -
Blockly.BlockSvg.TAB_WIDTH;
button.moveTo(x, y);
}