diff --git a/core/renderers/common/debugger.js b/core/renderers/common/debugger.js index 538c1a4a2..96f605335 100644 --- a/core/renderers/common/debugger.js +++ b/core/renderers/common/debugger.js @@ -179,7 +179,7 @@ Blockly.blockRendering.Debug.prototype.drawRenderedElem = function(elem, isRtl) if (Blockly.blockRendering.Types.isInput(elem) && Blockly.blockRendering.Debug.config.connections) { - this.drawConnection(elem.connection); + this.drawConnection(elem.connectionModel); } }; diff --git a/core/renderers/common/drawer.js b/core/renderers/common/drawer.js index 89209ee6f..268434b9b 100644 --- a/core/renderers/common/drawer.js +++ b/core/renderers/common/drawer.js @@ -390,13 +390,13 @@ Blockly.blockRendering.Drawer.prototype.drawInlineInput_ = function(input) { Blockly.blockRendering.Drawer.prototype.positionInlineInputConnection_ = function(input) { var yPos = input.centerline - input.height / 2; // Move the connection. - if (input.connection) { + if (input.connectionModel) { // xPos already contains info about startX var connX = input.xPos + input.connectionWidth + input.connectionOffsetX; if (this.info_.RTL) { connX *= -1; } - input.connection.setOffsetInBlock(connX, + input.connectionModel.setOffsetInBlock(connX, yPos + input.connectionOffsetY); } }; @@ -410,12 +410,12 @@ Blockly.blockRendering.Drawer.prototype.positionInlineInputConnection_ = functio */ Blockly.blockRendering.Drawer.prototype.positionStatementInputConnection_ = function(row) { var input = row.getLastInput(); - if (input.connection) { + if (input.connectionModel) { var connX = row.xPos + row.statementEdge + input.notchOffset; if (this.info_.RTL) { connX *= -1; } - input.connection.setOffsetInBlock(connX, row.yPos); + input.connectionModel.setOffsetInBlock(connX, row.yPos); } }; @@ -428,12 +428,12 @@ Blockly.blockRendering.Drawer.prototype.positionStatementInputConnection_ = func */ Blockly.blockRendering.Drawer.prototype.positionExternalValueConnection_ = function(row) { var input = row.getLastInput(); - if (input.connection) { + if (input.connectionModel) { var connX = row.xPos + row.width; if (this.info_.RTL) { connX *= -1; } - input.connection.setOffsetInBlock(connX, row.yPos); + input.connectionModel.setOffsetInBlock(connX, row.yPos); } }; diff --git a/core/renderers/geras/drawer.js b/core/renderers/geras/drawer.js index 311bd163f..fe7e41202 100644 --- a/core/renderers/geras/drawer.js +++ b/core/renderers/geras/drawer.js @@ -151,14 +151,14 @@ Blockly.geras.Drawer.prototype.drawInlineInput_ = function(input) { Blockly.geras.Drawer.prototype.positionInlineInputConnection_ = function(input) { var yPos = input.centerline - input.height / 2; // Move the connection. - if (input.connection) { + if (input.connectionModel) { // xPos already contains info about startX var connX = input.xPos + input.connectionWidth + this.constants_.DARK_PATH_OFFSET; if (this.info_.RTL) { connX *= -1; } - input.connection.setOffsetInBlock( + input.connectionModel.setOffsetInBlock( connX, yPos + input.connectionOffsetY + this.constants_.DARK_PATH_OFFSET); } @@ -169,14 +169,14 @@ Blockly.geras.Drawer.prototype.positionInlineInputConnection_ = function(input) */ Blockly.geras.Drawer.prototype.positionStatementInputConnection_ = function(row) { var input = row.getLastInput(); - if (input.connection) { + if (input.connectionModel) { var connX = row.xPos + row.statementEdge + input.notchOffset; if (this.info_.RTL) { connX *= -1; } else { connX += this.constants_.DARK_PATH_OFFSET; } - input.connection.setOffsetInBlock(connX, + input.connectionModel.setOffsetInBlock(connX, row.yPos + this.constants_.DARK_PATH_OFFSET); } }; @@ -186,13 +186,13 @@ Blockly.geras.Drawer.prototype.positionStatementInputConnection_ = function(row) */ Blockly.geras.Drawer.prototype.positionExternalValueConnection_ = function(row) { var input = row.getLastInput(); - if (input.connection) { + if (input.connectionModel) { var connX = row.xPos + row.width + this.constants_.DARK_PATH_OFFSET; if (this.info_.RTL) { connX *= -1; } - input.connection.setOffsetInBlock(connX, row.yPos); + input.connectionModel.setOffsetInBlock(connX, row.yPos); } }; diff --git a/core/renderers/measurables/inputs.js b/core/renderers/measurables/inputs.js index 2d505a342..2272755d3 100644 --- a/core/renderers/measurables/inputs.js +++ b/core/renderers/measurables/inputs.js @@ -61,10 +61,6 @@ Blockly.blockRendering.InputConnection = function(constants, input) { this.connectedBlockHeight = 0; } - // TODO (#3186): change references to connectionModel, since that's on - // Connection. - this.connection = - /** @type {!Blockly.RenderedConnection} */ (input.connection); this.connectionOffsetX = 0; this.connectionOffsetY = 0; };