mirror of
https://github.com/google/blockly.git
synced 2025-12-15 13:50:08 +01:00
fix: update a moved function in developer tools so it loads (#6500)
This commit is contained in:
committed by
GitHub
parent
88a5bba646
commit
ce3ec78501
@@ -25,7 +25,7 @@ WorkspaceFactoryGenerator = function(model) {
|
||||
var hiddenBlocks = document.createElement('div');
|
||||
// Generate a globally unique ID for the hidden div element to avoid
|
||||
// collisions.
|
||||
var hiddenBlocksId = Blockly.utils.genUid();
|
||||
var hiddenBlocksId = Blockly.utils.idGenerator.genUid();
|
||||
hiddenBlocks.id = hiddenBlocksId;
|
||||
hiddenBlocks.style.display = 'none';
|
||||
document.body.appendChild(hiddenBlocks);
|
||||
|
||||
@@ -477,7 +477,7 @@ ListElement = function(type, opt_name) {
|
||||
// Name of category. Can be changed by user. Null if separator.
|
||||
this.name = opt_name ? opt_name : null;
|
||||
// Unique ID of element. Does not change.
|
||||
this.id = Blockly.utils.genUid();
|
||||
this.id = Blockly.utils.idGenerator.genUid();
|
||||
// Colour of category. Default is no colour. Null if separator.
|
||||
this.colour = null;
|
||||
// Stores a custom tag, if necessary. Null if no custom tag or separator.
|
||||
@@ -538,7 +538,7 @@ ListElement.prototype.changeColour = function(colour) {
|
||||
ListElement.prototype.copy = function() {
|
||||
copy = new ListElement(this.type);
|
||||
// Generate a unique ID for the element.
|
||||
copy.id = Blockly.utils.genUid();
|
||||
copy.id = Blockly.utils.idGenerator.genUid();
|
||||
// Copy all attributes except ID.
|
||||
copy.name = this.name;
|
||||
copy.xml = this.xml;
|
||||
|
||||
@@ -179,7 +179,7 @@ export function sharedTestTeardown() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates stub for Blockly.utils.genUid that returns the provided id or ids.
|
||||
* Creates stub for Blockly.utils.idGenerator.genUid that returns the provided id or ids.
|
||||
* Recommended to also assert that the stub is called the expected number of
|
||||
* times.
|
||||
* @param {string|!Array<string>} returnIds The return values to use for the
|
||||
|
||||
Reference in New Issue
Block a user