From 45d66a1264a585b4a2c6723999274602e495a266 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 3 Oct 2019 17:58:29 -0700 Subject: [PATCH] Get rid of unnecessary nulls in block dragger, insertion marker manager, and gesture dispose functions. --- core/block_dragger.js | 4 ---- core/gesture.js | 10 ---------- core/insertion_marker_manager.js | 8 -------- 3 files changed, 22 deletions(-) diff --git a/core/block_dragger.js b/core/block_dragger.js index 7b8f3232b..f1b8a4f5b 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -100,14 +100,10 @@ Blockly.BlockDragger = function(block, workspace) { * @package */ Blockly.BlockDragger.prototype.dispose = function() { - this.draggingBlock_ = null; - this.workspace_ = null; - this.startWorkspace_ = null; this.dragIconData_.length = 0; if (this.draggedConnectionManager_) { this.draggedConnectionManager_.dispose(); - this.draggedConnectionManager_ = null; } }; diff --git a/core/gesture.js b/core/gesture.js index f27dfa982..677feabae 100644 --- a/core/gesture.js +++ b/core/gesture.js @@ -250,24 +250,14 @@ Blockly.Gesture.prototype.dispose = function() { Blockly.unbindEvent_(this.onUpWrapper_); } - - this.startField_ = null; - this.startBlock_ = null; - this.targetBlock_ = null; - this.startWorkspace_ = null; - this.flyout_ = null; - if (this.blockDragger_) { this.blockDragger_.dispose(); - this.blockDragger_ = null; } if (this.workspaceDragger_) { this.workspaceDragger_.dispose(); - this.workspaceDragger_ = null; } if (this.bubbleDragger_) { this.bubbleDragger_.dispose(); - this.bubbleDragger_ = null; } }; diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 62f46719c..85c23d43a 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -146,27 +146,19 @@ Blockly.InsertionMarkerManager = function(block) { * @package */ Blockly.InsertionMarkerManager.prototype.dispose = function() { - this.topBlock_ = null; - this.workspace_ = null; this.availableConnections_.length = 0; - this.closestConnection_ = null; - this.localConnection_ = null; Blockly.Events.disable(); try { if (this.firstMarker_) { this.firstMarker_.dispose(); - this.firstMarker_ = null; } if (this.lastMarker_) { this.lastMarker_.dispose(); - this.lastMarker_ = null; } } finally { Blockly.Events.enable(); } - - this.highlightedBlock_ = null; }; /**