mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Disable orphaned mutator blocks. (#2304)
This commit is contained in:
@@ -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 <g> rather than in
|
||||
// a top level svg. Instead of handling scale themselves, mutators
|
||||
|
||||
Reference in New Issue
Block a user