Merge pull request #3134 from rachel-fenichel/bugfix/3098

Bound element position based on height of the row
This commit is contained in:
Rachel Fenichel
2019-10-02 11:44:37 -07:00
committed by GitHub

View File

@@ -330,7 +330,8 @@ Blockly.geras.RenderInfo.prototype.getElemCenterline_ = function(row, elem) {
if (Blockly.blockRendering.Types.isField(elem) ||
Blockly.blockRendering.Types.isIcon(elem)) {
result += (elem.height / 2);
if (row.hasInlineInput || row.hasStatement) {
if ((row.hasInlineInput || row.hasStatement) &&
elem.height > row.height + this.constants_.TALL_INPUT_FIELD_OFFSET_Y) {
result += this.constants_.TALL_INPUT_FIELD_OFFSET_Y;
}
} else if (Blockly.blockRendering.Types.isInlineInput(elem)) {