Use row height for spacer height.

This commit is contained in:
Rachel Fenichel
2019-10-01 16:41:58 -07:00
parent d7a7c7b4d5
commit ecf69d851d
5 changed files with 36 additions and 29 deletions

View File

@@ -126,15 +126,14 @@ Blockly.blockRendering.Debug.prototype.drawSpacerElem = function(elem, rowHeight
if (isRtl) {
xPos = -(xPos + elem.width);
}
var debugRenderedHeight = Math.min(elem.height, rowHeight);
var yPos = elem.centerline - debugRenderedHeight / 2;
var yPos = elem.centerline - elem.height / 2;
this.debugElements_.push(Blockly.utils.dom.createSvgElement('rect',
{
'class': 'elemSpacerRect blockRenderDebug',
'x': xPos,
'y': yPos,
'width': elem.width,
'height': debugRenderedHeight,
'height': elem.height,
'stroke': 'pink',
'fill': 'pink',
'fill-opacity': '0.5',