Fix right aligned Flyout buttons when workspace is scaled

This commit is contained in:
Sam El-Husseini
2017-11-16 00:53:07 -08:00
committed by GitHub
parent bcedc130bb
commit ee7ad3dfef

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);
}