Refactor connect logic (#4880)

* Refactor connect logic.

* Fixup from rebase

* Fix build

* PR Comments
This commit is contained in:
Beka Westberg
2021-06-18 09:53:43 -07:00
committed by GitHub
parent 292911062e
commit 13bb9f5bf6
9 changed files with 441 additions and 500 deletions

View File

@@ -331,7 +331,7 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo
Blockly.InsertionMarkerManager.prototype.initAvailableConnections_ = function() {
var available = this.topBlock_.getConnections_(false);
// Also check the last connection on this stack
var lastOnStack = this.topBlock_.lastConnectionInStack();
var lastOnStack = this.topBlock_.lastConnectionInStack(true);
if (lastOnStack && lastOnStack != this.topBlock_.nextConnection) {
available.push(lastOnStack);
this.lastOnStack_ = lastOnStack;