This commit is contained in:
Rachel Fenichel
2019-08-08 15:51:48 -07:00
parent c901b20486
commit 67d6a2f4f8
3 changed files with 4 additions and 11 deletions

View File

@@ -135,12 +135,7 @@ Blockly.blockRendering.Drawer.prototype.drawTop_ = function() {
this.steps_.push(
Blockly.utils.svgPaths.moveBy(this.info_.startX, this.info_.startY));
for (var i = 0, elem; elem = elements[i]; i++) {
if (elem.type === 'square corner') {
// Do nothing?
//this.steps_.push(
//Blockly.utils.svgPaths.moveBy(this.info_.startX, this.info_.startY));
//this.steps_.push(Blockly.blockRendering.constants.START_POINT);
} else if (elem.type === 'round corner') {
if (elem.type === 'round corner') {
this.steps_.push(Blockly.blockRendering.constants.OUTSIDE_CORNERS.topLeft);
} else if (elem.type === 'previous connection') {
this.steps_.push(Blockly.blockRendering.constants.NOTCH.pathLeft);
@@ -149,6 +144,7 @@ Blockly.blockRendering.Drawer.prototype.drawTop_ = function() {
} else if (elem.isSpacer()) {
this.steps_.push('h', elem.width);
}
// No branch for a square corner, because it's a no-op.
}
this.steps_.push('v', topRow.height);
};
@@ -458,7 +454,7 @@ Blockly.blockRendering.Drawer.prototype.positionNextConnection_ = function() {
if (bottomRow.hasNextConnection) {
var connInfo = bottomRow.getNextConnection();
var x = connInfo.xPos; // Alreaady contains info about startX
var x = connInfo.xPos; // Already contains info about startX
var connX = (this.info_.RTL ? -x : x) + 0.5;
bottomRow.connection.setOffsetInBlock(
connX, this.info_.startY + this.info_.height +

View File

@@ -109,7 +109,7 @@ Blockly.blockRendering.Highlighter.prototype.drawValueInput = function(row) {
var input = row.getLastInput();
var steps = '';
if (this.RTL_) {
var aboveTabHeight = 0;//-this.highlightOffset_;
var aboveTabHeight = 0;
var belowTabHeight =
row.height - input.connectionHeight;

View File

@@ -708,7 +708,6 @@ Blockly.blockRendering.RenderInfo.prototype.finalize_ = function() {
yCursor = Blockly.blockRendering.constants.MIN_BLOCK_HEIGHT;
}
if (!(row.isSpacer())) {
// xcursor should start at startX (?)
var xCursor = this.startX;
for (var e = 0; e < row.elements.length; e++) {
var elem = row.elements[e];
@@ -718,8 +717,6 @@ Blockly.blockRendering.RenderInfo.prototype.finalize_ = function() {
}
}
}
this.blockBottom = yCursor;
// Don't count the start offset in the recorded height.
this.height = yCursor;
};