mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Fix error thrown when disconnecting blocks that have never been dragged.
This commit is contained in:
@@ -828,6 +828,8 @@ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) {
|
||||
if (this.parentBlock_) {
|
||||
// Push this block to the very top of the stack.
|
||||
this.unplug();
|
||||
var group = this.getSvgRoot();
|
||||
group.translate_ = 'translate(' + newXY.x + ',' + newXY.y + ')';
|
||||
this.disconnectUiEffect();
|
||||
}
|
||||
this.setDragging_(true);
|
||||
|
||||
@@ -64,6 +64,7 @@ Blockly.Connection.REASON_DIFFERENT_WORKSPACES = 5;
|
||||
* Connect two connections together.
|
||||
* @param {!Blockly.Connection} parentConnection Connection on superior block.
|
||||
* @param {!Blockly.Connection} childConnection Connection on inferior block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.connect_ = function(parentConnection, childConnection) {
|
||||
var parentBlock = parentConnection.getSourceBlock();
|
||||
|
||||
Reference in New Issue
Block a user