Skip to content

Commit

Permalink
fix: update a moved function in developer tools so it loads (#6500)
Browse files Browse the repository at this point in the history
  • Loading branch information
maribethb authored Oct 6, 2022
1 parent 88a5bba commit ce3ec78
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demos/blockfactory/workspacefactory/wfactory_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions demos/blockfactory/workspacefactory/wfactory_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/mocha/test_helpers/setup_teardown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce3ec78

Please sign in to comment.