Fix #423 by calling workspace's resize when the flyout reflows. (#430)

This commit is contained in:
picklesrus
2016-06-14 10:13:03 -07:00
committed by Neil Fraser
parent fd6f743f0e
commit 33ba6e8fad

View File

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