fix: properly pass the block to the icon constructor in blockfactory blocks (#7202)

This commit is contained in:
Beka Westberg
2023-06-23 11:01:35 -07:00
committed by GitHub
parent 7771a6dbff
commit acbe2c6a29

View File

@@ -336,8 +336,8 @@ Blockly.Blocks['field_dropdown'] = {
this.updateShape_(); this.updateShape_();
this.setPreviousStatement(true, 'Field'); this.setPreviousStatement(true, 'Field');
this.setNextStatement(true, 'Field'); this.setNextStatement(true, 'Field');
this.setMutator(new Blockly.icons.MutatorIcon(['field_dropdown_option_text', this.setMutator(new Blockly.icons.MutatorIcon(
'field_dropdown_option_image'])); ['field_dropdown_option_text', 'field_dropdown_option_image'], this));
this.setColour(160); this.setColour(160);
this.setTooltip('Dropdown menu with a list of options.'); this.setTooltip('Dropdown menu with a list of options.');
this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=386'); this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=386');
@@ -611,7 +611,7 @@ Blockly.Blocks['type_group'] = {
this.typeCount_ = 2; this.typeCount_ = 2;
this.updateShape_(); this.updateShape_();
this.setOutput(true, 'Type'); this.setOutput(true, 'Type');
this.setMutator(new Blockly.icons.MutatorIcon(['type_group_item'])); this.setMutator(new Blockly.icons.MutatorIcon(['type_group_item'], this));
this.setColour(230); this.setColour(230);
this.setTooltip('Allows more than one type to be accepted.'); this.setTooltip('Allows more than one type to be accepted.');
this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=677'); this.setHelpUrl('https://www.youtube.com/watch?v=s2_xaEvcVI0#t=677');