mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Fix connection disposal and get rid of startFlyout_
This commit is contained in:
parent
d3ea97cecc
commit
3202fcbd0c
2 changed files with 2 additions and 5 deletions
|
@ -258,6 +258,7 @@ Blockly.Block.prototype.dispose = function(healStack) {
|
|||
if (connection.isConnected()) {
|
||||
connection.disconnect();
|
||||
}
|
||||
connections[i].dispose();
|
||||
}
|
||||
} finally {
|
||||
Blockly.Events.enable();
|
||||
|
|
|
@ -892,7 +892,6 @@ Blockly.Flyout.prototype.blockMouseDown_ = function(block) {
|
|||
flyout.startDragMouseX_ = e.clientX;
|
||||
Blockly.Flyout.startDownEvent_ = e;
|
||||
Blockly.Flyout.startBlock_ = block;
|
||||
Blockly.Flyout.startFlyout_ = flyout;
|
||||
Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEvent_(document,
|
||||
'mouseup', flyout, flyout.onMouseUp_);
|
||||
Blockly.Flyout.onMouseMoveBlockWrapper_ = Blockly.bindEvent_(document,
|
||||
|
@ -1237,9 +1236,7 @@ Blockly.Flyout.prototype.getClientRect = function() {
|
|||
* @private
|
||||
*/
|
||||
Blockly.Flyout.terminateDrag_ = function() {
|
||||
if (Blockly.Flyout.startFlyout_) {
|
||||
Blockly.Flyout.startFlyout_.dragMode_ = Blockly.DRAG_NONE;
|
||||
}
|
||||
this.dragMode_ = Blockly.DRAG_NONE;
|
||||
if (Blockly.Flyout.onMouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_);
|
||||
Blockly.Flyout.onMouseUpWrapper_ = null;
|
||||
|
@ -1258,7 +1255,6 @@ Blockly.Flyout.terminateDrag_ = function() {
|
|||
}
|
||||
Blockly.Flyout.startDownEvent_ = null;
|
||||
Blockly.Flyout.startBlock_ = null;
|
||||
Blockly.Flyout.startFlyout_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue