mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Update availble connections when we have unplugged a block (#3954)
* Update availble connections when we have unplugged a block
This commit is contained in:
@@ -162,6 +162,7 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY,
|
||||
|
||||
this.draggingBlock_.translate(newLoc.x, newLoc.y);
|
||||
Blockly.blockAnimations.disconnectUiEffect(this.draggingBlock_);
|
||||
this.draggedConnectionManager_.updateAvailableConnections();
|
||||
}
|
||||
this.draggingBlock_.setDragging(true);
|
||||
// For future consideration: we may be able to put moveToDragSurface inside
|
||||
|
||||
@@ -160,6 +160,15 @@ Blockly.InsertionMarkerManager.prototype.dispose = function() {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the available connections for the top block. These connections can
|
||||
* change if a block is unplugged and the stack is healed.
|
||||
* @package
|
||||
*/
|
||||
Blockly.InsertionMarkerManager.prototype.updateAvailableConnections = function() {
|
||||
this.availableConnections_ = this.initAvailableConnections_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Return whether the block would be deleted if dropped immediately, based on
|
||||
* information from the most recent move event.
|
||||
|
||||
Reference in New Issue
Block a user