From 1924b2674a1edf52212460b531a373364261b284 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Sat, 11 Jan 2020 17:34:45 -0800 Subject: [PATCH] Treat a statement input as the end of the statement row. (#3577) * Reduce spacing for editable fields when they appear right before a statement input. --- core/renderers/geras/info.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/renderers/geras/info.js b/core/renderers/geras/info.js index 4678c7215..a64ed5fef 100644 --- a/core/renderers/geras/info.js +++ b/core/renderers/geras/info.js @@ -185,8 +185,9 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) { return this.constants_.LARGE_PADDING; } - // Spacing between a non-input and the end of the row. - if (!Blockly.blockRendering.Types.isInput(prev) && !next) { + // Spacing between a non-input and the end of the row or a statement input. + if (!Blockly.blockRendering.Types.isInput(prev) && (!next || + Blockly.blockRendering.Types.isStatementInput(next))) { // Between an editable field and the end of the row. if (Blockly.blockRendering.Types.isField(prev) && prev.isEditable) { return this.constants_.MEDIUM_PADDING;