mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Remove require destructuring (#5294)
This commit is contained in:
@@ -16,8 +16,8 @@ goog.module.declareLegacyNamespace();
|
||||
|
||||
const ASTNode = goog.require('Blockly.ASTNode');
|
||||
const Cursor = goog.require('Blockly.Cursor');
|
||||
const {register, Type} = goog.require('Blockly.registry');
|
||||
const {inherits} = goog.require('Blockly.utils.object');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
const registry = goog.require('Blockly.registry');
|
||||
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ const {inherits} = goog.require('Blockly.utils.object');
|
||||
const BasicCursor = function() {
|
||||
BasicCursor.superClass_.constructor.call(this);
|
||||
};
|
||||
inherits(BasicCursor, Cursor);
|
||||
object.inherits(BasicCursor, Cursor);
|
||||
|
||||
/**
|
||||
* Name used for registering a basic cursor.
|
||||
@@ -214,6 +214,7 @@ BasicCursor.prototype.getRightMostChild_ = function(node) {
|
||||
return this.getRightMostChild_(newNode);
|
||||
};
|
||||
|
||||
register(Type.CURSOR, BasicCursor.registrationName, BasicCursor);
|
||||
registry.register(
|
||||
registry.Type.CURSOR, BasicCursor.registrationName, BasicCursor);
|
||||
|
||||
exports = BasicCursor;
|
||||
|
||||
@@ -16,8 +16,8 @@ goog.module.declareLegacyNamespace();
|
||||
|
||||
const ASTNode = goog.require('Blockly.ASTNode');
|
||||
const Marker = goog.require('Blockly.Marker');
|
||||
const {DEFAULT, register, Type} = goog.require('Blockly.registry');
|
||||
const {inherits} = goog.require('Blockly.utils.object');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
const registry = goog.require('Blockly.registry');
|
||||
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ const Cursor = function() {
|
||||
*/
|
||||
this.type = 'cursor';
|
||||
};
|
||||
inherits(Cursor, Marker);
|
||||
object.inherits(Cursor, Marker);
|
||||
|
||||
/**
|
||||
* Find the next connection, field, or block.
|
||||
@@ -134,6 +134,6 @@ Cursor.prototype.out = function() {
|
||||
return newNode;
|
||||
};
|
||||
|
||||
register(Type.CURSOR, DEFAULT, Cursor);
|
||||
registry.register(registry.Type.CURSOR, registry.DEFAULT, Cursor);
|
||||
|
||||
exports = Cursor;
|
||||
|
||||
@@ -18,7 +18,7 @@ const ASTNode = goog.require('Blockly.ASTNode');
|
||||
const BasicCursor = goog.require('Blockly.BasicCursor');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Field = goog.requireType('Blockly.Field');
|
||||
const {inherits} = goog.require('Blockly.utils.object');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ const {inherits} = goog.require('Blockly.utils.object');
|
||||
const TabNavigateCursor = function() {
|
||||
TabNavigateCursor.superClass_.constructor.call(this);
|
||||
};
|
||||
inherits(TabNavigateCursor, BasicCursor);
|
||||
object.inherits(TabNavigateCursor, BasicCursor);
|
||||
|
||||
/**
|
||||
* Skip all nodes except for tab navigable fields.
|
||||
|
||||
Reference in New Issue
Block a user