mirror of
https://github.com/google/blockly.git
synced 2026-01-12 11:27:14 +01:00
Use baseline for positioning rendered connection. (#3609)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user