mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Don’t move immovable blocks in workspace cleanup. (#2104)
This commit is contained in:
@@ -1285,6 +1285,9 @@ Blockly.WorkspaceSvg.prototype.cleanUp = function() {
|
||||
var topBlocks = this.getTopBlocks(true);
|
||||
var cursorY = 0;
|
||||
for (var i = 0, block; block = topBlocks[i]; i++) {
|
||||
if (!block.isMovable()) {
|
||||
continue;
|
||||
}
|
||||
var xy = block.getRelativeToSurfaceXY();
|
||||
block.moveBy(-xy.x, cursorY - xy.y);
|
||||
block.snapToGrid();
|
||||
|
||||
Reference in New Issue
Block a user