diff --git a/core/block.js b/core/block.js index c8eda7d08..18ff384cf 100644 --- a/core/block.js +++ b/core/block.js @@ -330,6 +330,7 @@ Blockly.Block.prototype.lastConnectionInStack_ = function() { * connected should not coincidentally line up on screen. * @private */ +// TODO: Refactor to return early in headless mode. Blockly.Block.prototype.bumpNeighbours_ = function() { if (!this.workspace) { return; // Deleted block. diff --git a/core/connection.js b/core/connection.js index c68cd704c..2b8739845 100644 --- a/core/connection.js +++ b/core/connection.js @@ -622,6 +622,22 @@ Blockly.Connection.prototype.getShadowDom = function() { return this.shadowDom_; }; +/** + * Find all nearby compatible connections to this connection. + * Type checking does not apply, since this function is used for bumping. + * + * Headless configurations (the default) do not have neighboring connection, + * and always return an empty list (the default). + * {@link Blockly.RenderedConnection} overrides this behavior with a list + * computed from the rendered positioning. + * @param {number} maxLimit The maximum radius to another connection. + * @return {!Array.} List of connections. + * @private + */ +Blockly.Connection.prototype.neighbours_ = function(/* maxLimit */) { + return []; +}; + /** * This method returns a string describing this Connection in developer terms * (English only). Intended to on be used in console logs and errors.