mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
chore: remove declareLegacyNamespace from events (#5532)
- Adds an extra events/utils.js file to hold helper methods related to events.
This commit is contained in:
@@ -17,7 +17,6 @@ goog.module('Blockly.blockRendering.MarkerSvg');
|
||||
const Connection = goog.requireType('Blockly.Connection');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const ConstantProvider = goog.requireType('Blockly.blockRendering.ConstantProvider');
|
||||
const Events = goog.require('Blockly.Events');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Field = goog.requireType('Blockly.Field');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -28,6 +27,7 @@ const Svg = goog.require('Blockly.utils.Svg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
const dom = goog.require('Blockly.utils.dom');
|
||||
const eventUtils = goog.require('Blockly.Events.utils');
|
||||
const svgPaths = goog.require('Blockly.utils.svgPaths');
|
||||
const {ASTNode} = goog.require('Blockly.ASTNode');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -557,9 +557,9 @@ MarkerSvg.prototype.hide = function() {
|
||||
*/
|
||||
MarkerSvg.prototype.fireMarkerEvent_ = function(oldNode, curNode) {
|
||||
const curBlock = curNode.getSourceBlock();
|
||||
const event = new (Events.get(Events.MARKER_MOVE))(
|
||||
const event = new (eventUtils.get(eventUtils.MARKER_MOVE))(
|
||||
curBlock, this.isCursor(), oldNode, curNode);
|
||||
Events.fire(event);
|
||||
eventUtils.fire(event);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user