Look up notch height from the current renderer (#3217)

This commit is contained in:
Josh Lory
2019-10-11 15:30:26 -07:00
committed by Sam El-Husseini
parent e18dcd1bea
commit 43f9ab6889

View File

@@ -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};