mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-09 20:43:59 -04:00
feat: ability to clear flyout blocks when language changes
This commit is contained in:
parent
f930aa61a9
commit
2581446907
3 changed files with 28 additions and 0 deletions
src/engine
|
@ -831,6 +831,14 @@ class Blocks {
|
|||
this.emitProjectChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all blocks and their associated scripts.
|
||||
*/
|
||||
deleteAllBlocks () {
|
||||
const blockIds = Object.keys(this._blocks);
|
||||
blockIds.forEach(blockId => this.deleteBlock(blockId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of all references to variables or lists from blocks
|
||||
* in this block container.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue