From 471b54bea835c5218ebcc36b85f04dc00c4bb371 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Wed, 20 Feb 2019 08:59:32 -0800 Subject: [PATCH] Disable orphaned mutator blocks. (#2304) --- core/mutator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/mutator.js b/core/mutator.js index 004be6996..da50251ea 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -141,6 +141,7 @@ Blockly.Mutator.prototype.createEditor_ = function() { var quarkXml = null; } var workspaceOptions = { + disabledPatternId: this.block_.workspace.options.disabledPatternId, languageTree: quarkXml, parentWorkspace: this.block_.workspace, pathToMedia: this.block_.workspace.options.pathToMedia, @@ -153,6 +154,7 @@ Blockly.Mutator.prototype.createEditor_ = function() { }; this.workspace_ = new Blockly.WorkspaceSvg(workspaceOptions); this.workspace_.isMutator = true; + this.workspace_.addChangeListener(Blockly.Events.disableOrphans); // Mutator flyouts go inside the mutator workspace's rather than in // a top level svg. Instead of handling scale themselves, mutators