Fixing width computation and start x for statement input draw.

This commit is contained in:
kozbial
2019-08-14 11:34:32 -07:00
parent d921c4ff47
commit a476564fa2
2 changed files with 3 additions and 4 deletions

View File

@@ -200,9 +200,7 @@ Blockly.blockRendering.Drawer.prototype.drawStatementInput_ = function(row) {
}
var input = row.getLastInput();
// Where to start drawing the notch, which is on the right side in LTR.
var x = row.xPos + input.xPos +
Blockly.blockRendering.constants.NOTCH_OFFSET_LEFT +
Blockly.blockRendering.constants.NOTCH.width;
var x = input.xPos + input.width;
var innerTopLeftCorner =
Blockly.blockRendering.constants.NOTCH.pathRight + ' h -' +

View File

@@ -292,7 +292,8 @@ Blockly.blockRendering.StatementInput = function(input) {
this.height -= this.notchShape.height;
}
}
this.width = this.notchShape.width * 2;
this.width = Blockly.blockRendering.constants.NOTCH_OFFSET_LEFT +
this.notchShape.width;
};
goog.inherits(Blockly.blockRendering.StatementInput,
Blockly.blockRendering.Input);