mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Disable workspace resizing at the beginning of cleanup blocks and re-enable at the end. (#1331)
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user