diff --git a/core/renderers/zelos/constants.js b/core/renderers/zelos/constants.js index 949f990fc..db4c2bc8c 100644 --- a/core/renderers/zelos/constants.js +++ b/core/renderers/zelos/constants.js @@ -96,6 +96,11 @@ Blockly.zelos.ConstantProvider = function() { */ this.MIN_BLOCK_HEIGHT = 12 * this.GRID_UNIT; + /** + * @override + */ + this.EMPTY_STATEMENT_INPUT_HEIGHT = 6 * this.GRID_UNIT; + /** * @override */ diff --git a/core/renderers/zelos/info.js b/core/renderers/zelos/info.js index 580fc3fe2..aea66f2cc 100644 --- a/core/renderers/zelos/info.js +++ b/core/renderers/zelos/info.js @@ -221,6 +221,17 @@ Blockly.zelos.RenderInfo.prototype.getSpacerRowWidth_ = function(prev, next) { return width; }; +/** + * @override + */ +Blockly.zelos.RenderInfo.prototype.getElemCenterline_ = function(row, elem) { + if (row.hasStatement) { + return row.yPos + this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT / 2; + } + return Blockly.zelos.RenderInfo.superClass_.getElemCenterline_.call(this, + row, elem); +}; + /** * Adjust the x position of fields to bump all non-label fields in the first row * past the notch position. This must be called before ``computeBounds`` is