mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Fix disposing of a workspace (#3960)
This commit is contained in:
@@ -651,9 +651,6 @@ Blockly.Gesture.prototype.handleWsStart = function(e, ws) {
|
||||
this.setStartWorkspace_(ws);
|
||||
this.mostRecentEvent_ = e;
|
||||
this.doStart(e);
|
||||
if (!this.startBlock_ && !this.startBubble_) {
|
||||
this.fireWorkspaceClick_(ws);
|
||||
}
|
||||
if (this.startWorkspace_.keyboardAccessibilityMode) {
|
||||
Blockly.navigation.setState(Blockly.navigation.STATE_WS);
|
||||
}
|
||||
|
||||
@@ -817,6 +817,14 @@ Blockly.WorkspaceSvg.prototype.dispose = function() {
|
||||
|
||||
this.renderer_.dispose();
|
||||
|
||||
if (this.markerManager_) {
|
||||
this.markerManager_.dispose();
|
||||
this.markerManager_ = null;
|
||||
}
|
||||
|
||||
Blockly.WorkspaceSvg.superClass_.dispose.call(this);
|
||||
|
||||
// Dispose of theme manager after all blocks and mutators are disposed of.
|
||||
if (this.themeManager_) {
|
||||
this.themeManager_.unsubscribeWorkspace(this);
|
||||
this.themeManager_.unsubscribe(this.svgBackground_);
|
||||
@@ -826,13 +834,6 @@ Blockly.WorkspaceSvg.prototype.dispose = function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.markerManager_) {
|
||||
this.markerManager_.dispose();
|
||||
this.markerManager_ = null;
|
||||
}
|
||||
|
||||
Blockly.WorkspaceSvg.superClass_.dispose.call(this);
|
||||
|
||||
this.connectionDBList = null;
|
||||
|
||||
this.toolboxCategoryCallbacks_ = null;
|
||||
|
||||
Reference in New Issue
Block a user