Centralize references to some shapes.

This commit is contained in:
Rachel Fenichel
2019-08-12 13:02:54 -07:00
parent 797b8dae46
commit 6e825c33a0
3 changed files with 2 additions and 8 deletions

View File

@@ -360,7 +360,7 @@ Blockly.blockRendering.Drawer.prototype.drawInlineInput_ = function(input) {
this.inlineSteps_.push('M', connectionRight + ',' + yPos);
this.inlineSteps_.push('v ', connectionTop);
this.inlineSteps_.push(Blockly.blockRendering.constants.PUZZLE_TAB.pathDown);
this.inlineSteps_.push(input.connectionShape.pathDown);
this.inlineSteps_.push('v', height - connectionBottom);
this.inlineSteps_.push('h', width - input.connectionWidth);
this.inlineSteps_.push('v', -height);

View File

@@ -697,12 +697,6 @@ Blockly.blockRendering.RenderInfo.prototype.finalize_ = function() {
// Performance note: this could be combined with the draw pass, if the time
// that this takes is excessive. But it shouldn't be, because it only
// accesses and sets properties that already exist on the objects.
// TODO: Decide if there's a better place for this.
if (this.outputConnection) {
this.startX = this.outputConnection.startX;
this.width += this.outputConnection.width;
}
var yCursor = 0;
for (var r = 0; r < this.rows.length; r++) {
var row = this.rows[r];

View File

@@ -260,7 +260,7 @@ Blockly.blockRendering.InlineInput = function(input) {
// We allow the dark path to show on the parent block so that the child
// block looks embossed. This takes up an extra pixel in both x and y.
this.width = this.connectedBlockWidth +
Blockly.blockRendering.constants.TAB_WIDTH +
this.connectionShape.width +
Blockly.blockRendering.constants.DARK_PATH_OFFSET;
this.height = this.connectedBlockHeight + Blockly.blockRendering.constants.DARK_PATH_OFFSET;
}