Check if both sides of a potential connection match, not just one

This commit is contained in:
Rachel Fenichel
2018-11-30 14:46:09 -08:00
parent b606bc5ec6
commit 1553096b48

View File

@@ -335,7 +335,8 @@ Blockly.InsertionMarkerManager.prototype.shouldUpdatePreviews_ = function(
// Decide whether the new connection has higher priority.
if (this.localConnection_ && this.closestConnection_) {
// The connection was the same as the current connection.
if (this.closestConnection_ == candidateClosest) {
if (this.closestConnection_ == candidateClosest &&
this.localConnection_ == candidateLocal) {
return false;
}
var xDiff = this.localConnection_.x_ + dxy.x - this.closestConnection_.x_;