mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
* chore: refactor getVars and getVarModels * chore: cleanup renaming procedures * fix: updating params in mutator * chore: remove dead visual update code * chore: fix test assertions * chore: move context menu to use procedure model * fix: renaming early parameters not applying * chore: remove data update code * chore: remove references to argumnets from caller serialization * chore: remove extraneous visual update code * chore: remove delete event listener * chore: remove last unused data attributes * fix: creating procedure defs with params from callers * chore: format * chore: cleanup from rebase * chore: format * chore: remove logs * chore: fix PR comments * chore: cleanup * chore: make hasReturn_ private
27 lines
650 B
TypeScript
27 lines
650 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import * as goog from '../../closure/goog/goog.js';
|
|
import {isProcedureBlock} from '../interfaces/i_procedure_block.js';
|
|
import {Workspace} from '../workspace.js';
|
|
|
|
goog.declareModuleId('Blockly.procedures.updateProcedures');
|
|
|
|
|
|
/**
|
|
* Calls the `doProcedureUpdate` method on all blocks which implement it.
|
|
*
|
|
* @internal
|
|
*/
|
|
export function triggerProceduresUpdate(workspace: Workspace) {
|
|
if (workspace.isClearing) return;
|
|
for (const block of workspace.getAllBlocks(false)) {
|
|
if (isProcedureBlock(block)) {
|
|
block.doProcedureUpdate();
|
|
}
|
|
}
|
|
}
|