Bump unconnected blocks after mutator change.

This commit is contained in:
Neil Fraser
2015-02-27 14:24:20 -08:00
parent a494cbf0e7
commit 169ece400b
5 changed files with 9 additions and 6 deletions

View File

@@ -34,7 +34,6 @@ goog.require('Blockly.Mutator');
goog.require('Blockly.Warning');
goog.require('Blockly.Workspace');
goog.require('Blockly.Xml');
goog.require('goog.Timer');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.math.Coordinate');

View File

@@ -31,6 +31,7 @@ goog.require('Blockly.ContextMenu');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.math.Coordinate');
goog.require('goog.Timer');
/**

View File

@@ -31,6 +31,7 @@ goog.require('Blockly.Bubble');
goog.require('Blockly.Icon');
goog.require('Blockly.WorkspaceSvg');
goog.require('goog.dom');
goog.require('goog.Timer');
/**
@@ -285,6 +286,8 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() {
this.resizeBubble_();
// The source block may have changed, notify its workspace.
this.block_.workspace.fireChangeEvent();
goog.Timer.callOnce(
this.block_.bumpNeighbours_, Blockly.BUMP_DELAY, this.block_);
}
};