mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
refactor: move Blockly.deleteBlock out of blockly.js (#5483)
This commit is contained in:
committed by
GitHub
parent
c5acc1de72
commit
3bac582edb
@@ -13,7 +13,6 @@
|
||||
goog.module('Blockly.ContextMenuItems');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
const Blockly = goog.require('Blockly');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const BlockSvg = goog.requireType('Blockly.BlockSvg');
|
||||
const ContextMenuRegistry = goog.require('Blockly.ContextMenuRegistry');
|
||||
@@ -530,11 +529,9 @@ const registerDelete = function() {
|
||||
},
|
||||
callback: function(/** @type {!ContextMenuRegistry.Scope} */
|
||||
scope) {
|
||||
Events.setGroup(true);
|
||||
if (scope.block) {
|
||||
Blockly.deleteBlock(scope.block);
|
||||
scope.block.checkAndDelete();
|
||||
}
|
||||
Events.setGroup(false);
|
||||
},
|
||||
scopeType: ContextMenuRegistry.ScopeType.BLOCK,
|
||||
id: 'blockDelete',
|
||||
|
||||
Reference in New Issue
Block a user