mirror of
https://github.com/google/blockly.git
synced 2026-01-06 00:20:37 +01:00
fix!: refactor mutator icon (#7115)
* feat: add basic mutator icon * feat: add actual mutation behavior to icon * chore: add bumping blocks back into the bubble * fix: add updating block styles * feat: add static methods to mutator icon * chore: delete old mutator code * fix: use the new mutator icon * chore: docs and format * chore: my own comments * chore: first pass at PR comments * chore: make type strings internal * chore: add todo * chore: format * chore: move properties to module level * chore: fix using in demos * chore: move Mutator to icons.MutatorIcon * chore: move reconnect to connection * chore: move findParentWs to workspace * chore: properly override and call super * chore: remove bubbleIsVisible check * chore: change imports to import type * chore: use elvis operator * chore: update renamings * chore: reduce changes to js block files
This commit is contained in:
@@ -10,7 +10,7 @@ goog.declareModuleId('Blockly.Extensions');
|
||||
import type {Block} from './block.js';
|
||||
import type {BlockSvg} from './block_svg.js';
|
||||
import {FieldDropdown} from './field_dropdown.js';
|
||||
import {Mutator} from './mutator.js';
|
||||
import {MutatorIcon} from './icons/mutator_icon.js';
|
||||
import * as parsing from './utils/parsing.js';
|
||||
|
||||
/** The set of all registered extensions, keyed by extension name/id. */
|
||||
@@ -89,7 +89,7 @@ export function registerMutator(
|
||||
// Sanity checks passed.
|
||||
register(name, function (this: Block) {
|
||||
if (hasMutatorDialog) {
|
||||
this.setMutator(new Mutator(opt_blockList || [], this as BlockSvg));
|
||||
this.setMutator(new MutatorIcon(opt_blockList || [], this as BlockSvg));
|
||||
}
|
||||
// Mixin the object.
|
||||
this.mixin(mixinObj);
|
||||
|
||||
Reference in New Issue
Block a user