From 43f9ab68899fa96565a3d3d2ac131c3dce283e29 Mon Sep 17 00:00:00 2001 From: Josh Lory Date: Fri, 11 Oct 2019 15:30:26 -0700 Subject: [PATCH] Look up notch height from the current renderer (#3217) --- core/block_svg.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/block_svg.js b/core/block_svg.js index 7c1ef782a..1ebaa5388 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -1807,7 +1807,9 @@ Blockly.BlockSvg.prototype.getHeightWidth = function() { var nextBlock = this.getNextBlock(); if (nextBlock) { var nextHeightWidth = nextBlock.getHeightWidth(); - height += nextHeightWidth.height - 4; // Height of tab. + var workspace = /** @type {!Blockly.WorkspaceSvg} */ (this.workspace); + var tabHeight = workspace.getRenderer().getConstants().NOTCH_HEIGHT; + height += nextHeightWidth.height - tabHeight; width = Math.max(width, nextHeightWidth.width); } return {height: height, width: width};