diff --git a/core/renderers/common/constants.js b/core/renderers/common/constants.js index 47d418da4..4fd3c8eff 100644 --- a/core/renderers/common/constants.js +++ b/core/renderers/common/constants.js @@ -139,6 +139,13 @@ Blockly.blockRendering.ConstantProvider = function() { */ this.NOTCH_OFFSET_LEFT = 15; + /** + * Additional offset added to the statement input's width to account for the + * notch. + * @type {number} + */ + this.STATEMENT_INPUT_NOTCH_OFFSET = this.NOTCH_OFFSET_LEFT; + this.STATEMENT_BOTTOM_SPACER = 0; this.STATEMENT_INPUT_PADDING_LEFT = 20; diff --git a/core/renderers/measurables/inputs.js b/core/renderers/measurables/inputs.js index a7a80068d..966bd4a98 100644 --- a/core/renderers/measurables/inputs.js +++ b/core/renderers/measurables/inputs.js @@ -132,7 +132,7 @@ Blockly.blockRendering.StatementInput = function(constants, input) { this.height = this.connectedBlockHeight + this.constants_.STATEMENT_BOTTOM_SPACER; } - this.width = this.constants_.NOTCH_OFFSET_LEFT + this.shape.width; + this.width = this.constants_.STATEMENT_INPUT_NOTCH_OFFSET + this.shape.width; }; Blockly.utils.object.inherits(Blockly.blockRendering.StatementInput, Blockly.blockRendering.InputConnection); diff --git a/core/renderers/zelos/constants.js b/core/renderers/zelos/constants.js index f797e59c4..1e57ab92a 100644 --- a/core/renderers/zelos/constants.js +++ b/core/renderers/zelos/constants.js @@ -80,6 +80,11 @@ Blockly.zelos.ConstantProvider = function() { * @override */ this.NOTCH_OFFSET_LEFT = 3 * this.GRID_UNIT; + + /** + * @override + */ + this.STATEMENT_INPUT_NOTCH_OFFSET = this.NOTCH_OFFSET_LEFT; /** * @override @@ -373,6 +378,8 @@ Blockly.zelos.ConstantProvider.prototype.init = function() { Blockly.zelos.ConstantProvider.superClass_.init.call(this); this.HEXAGONAL = this.makeHexagonal(); this.ROUNDED = this.makeRounded(); + + this.STATEMENT_INPUT_NOTCH_OFFSET += this.INSIDE_CORNERS.rightWidth; }; /**