mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Centralize references to some shapes.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user