Fix icons in geras

This commit is contained in:
Rachel Fenichel
2019-08-21 14:35:36 -07:00
parent e86c852936
commit d19614439f

View File

@@ -327,7 +327,7 @@ Blockly.geras.RenderInfo.prototype.getSpacerRowHeight_ = function(prev, next) {
*/
Blockly.geras.RenderInfo.prototype.getElemCenterline_ = function(row, elem) {
var result = row.yPos;
if (elem.isField()) {
if (elem.isField() || elem.isIcon()) {
result += (elem.height / 2);
if (row.hasInlineInput || row.hasStatement) {
result += Blockly.blockRendering.constants.TALL_INPUT_FIELD_OFFSET_Y;