Use baseline for positioning rendered connection. (#3609)

This commit is contained in:
Monica Kozbial
2020-01-16 16:07:38 -08:00
committed by GitHub
parent 6ce1325663
commit 1afff3c439
2 changed files with 2 additions and 4 deletions

View File

@@ -461,8 +461,7 @@ Blockly.blockRendering.Drawer.prototype.positionNextConnection_ = function() {
var connInfo = bottomRow.connection;
var x = connInfo.xPos; // Already contains info about startX
var connX = (this.info_.RTL ? -x : x);
connInfo.connectionModel.setOffsetInBlock(
connX, (connInfo.centerline - connInfo.height / 2));
connInfo.connectionModel.setOffsetInBlock(connX, bottomRow.baseline);
}
};

View File

@@ -211,7 +211,6 @@ Blockly.geras.Drawer.prototype.positionNextConnection_ = function() {
var connX = (this.info_.RTL ? -x : x) +
(this.constants_.DARK_PATH_OFFSET / 2);
connInfo.connectionModel.setOffsetInBlock(
connX, (connInfo.centerline - connInfo.height / 2) +
this.constants_.DARK_PATH_OFFSET);
connX, bottomRow.baseline + this.constants_.DARK_PATH_OFFSET);
}
};