Disable workspace resizing at the beginning of cleanup blocks and re-enable at the end. (#1331)

This commit is contained in:
picklesrus
2017-09-21 16:20:17 -07:00
committed by GitHub
parent d45d42dad7
commit b3ba25ab5c

View File

@@ -1140,6 +1140,7 @@ Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox = function() {
* Clean up the workspace by ordering all the blocks in a column.
*/
Blockly.WorkspaceSvg.prototype.cleanUp = function() {
this.setResizesEnabled(false);
Blockly.Events.setGroup(true);
var topBlocks = this.getTopBlocks(true);
var cursorY = 0;
@@ -1151,8 +1152,7 @@ Blockly.WorkspaceSvg.prototype.cleanUp = function() {
block.getHeightWidth().height + Blockly.BlockSvg.MIN_BLOCK_Y;
}
Blockly.Events.setGroup(false);
// Fire an event to allow scrollbars to resize.
this.resizeContents();
this.setResizesEnabled(true);
};
/**