Skip to content

Commit 55a89b0

Browse files
committed
chore: reduce changes to js block files
1 parent 1e7d951 commit 55a89b0

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

blocks/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const {RenderedConnection} = goog.requireType('Blockly.RenderedConnection');
3030
const {Workspace} = goog.requireType('Blockly.Workspace');
3131
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
3232
/** @suppress {extraRequire} */
33-
goog.require('Blockly.icons.MutatorIcon');
33+
goog.require('Blockly.Mutator');
3434
/** @suppress {extraRequire} */
3535
goog.require('Blockly.FieldDropdown');
3636
/** @suppress {extraRequire} */

blocks/procedures.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const {Block} = goog.requireType('Blockly.Block');
3030
const BlockDefinition = Object;
3131
const {config} = goog.require('Blockly.config');
3232
const {Msg} = goog.require('Blockly.Msg');
33-
const {MutatorIcon} = goog.require('Blockly.icons.MutatorIcon');
33+
const {Mutator: Mutator} = goog.require('Blockly.Mutator');
3434
const {Names} = goog.require('Blockly.Names');
3535
/* eslint-disable-next-line no-unused-vars */
3636
const {VariableModel} = goog.requireType('Blockly.VariableModel');
@@ -388,7 +388,7 @@ const PROCEDURE_DEF_COMMON = {
388388
displayRenamedVar_: function(oldName, newName) {
389389
this.updateParams_();
390390
// Update the mutator's variables if the mutator is open.
391-
const mutator = this.getIcon(MutatorIcon.TYPE);
391+
const mutator = this.getIcon(Mutator.TYPE);
392392
if (mutator && mutator.bubbleIsVisible()) {
393393
const blocks = mutator.getWorkspace().getAllBlocks(false);
394394
for (let i = 0, block; (block = blocks[i]); i++) {
@@ -462,7 +462,7 @@ blocks['procedures_defnoreturn'] = {
462462
.appendField(Msg['PROCEDURES_DEFNORETURN_TITLE'])
463463
.appendField(nameField, 'NAME')
464464
.appendField('', 'PARAMS');
465-
this.setMutator(new MutatorIcon(['procedures_mutatorarg'], this));
465+
this.setMutator(new Mutator(['procedures_mutatorarg'], this));
466466
if ((this.workspace.options.comments ||
467467
(this.workspace.options.parentWorkspace &&
468468
this.workspace.options.parentWorkspace.options.comments)) &&
@@ -512,7 +512,7 @@ blocks['procedures_defreturn'] = {
512512
this.appendValueInput('RETURN')
513513
.setAlign(Align.RIGHT)
514514
.appendField(Msg['PROCEDURES_DEFRETURN_RETURN']);
515-
this.setMutator(new MutatorIcon(['procedures_mutatorarg'], this));
515+
this.setMutator(new Mutator(['procedures_mutatorarg'], this));
516516
if ((this.workspace.options.comments ||
517517
(this.workspace.options.parentWorkspace &&
518518
this.workspace.options.parentWorkspace.options.comments)) &&
@@ -732,7 +732,7 @@ const PROCEDURE_CALL_COMMON = {
732732
// which might reappear if a param is reattached in the mutator.
733733
const defBlock =
734734
Procedures.getDefinition(this.getProcedureCall(), this.workspace);
735-
const mutatorIcon = defBlock && defBlock.getIcon(MutatorIcon.TYPE);
735+
const mutatorIcon = defBlock && defBlock.getIcon(Mutator.TYPE);
736736
const mutatorOpen =
737737
mutatorIcon && mutatorIcon.bubbleIsVisible();
738738
if (!mutatorOpen) {

core/icons/mutator_icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import * as goog from '../../closure/goog/goog.js';
8-
goog.declareModuleId('Blockly.icons.MutatorIcon');
8+
goog.declareModuleId('Blockly.Mutator');
99

1010
import type {Abstract} from '../events/events_abstract.js';
1111
import type {Block} from '../block.js';

0 commit comments

Comments
 (0)