mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-07 19:14:40 -04:00
Only add to stacks if topLevel is true in CREATE
This commit is contained in:
parent
e5b677c7f6
commit
285c2792ef
1 changed files with 5 additions and 4 deletions
|
@ -91,10 +91,11 @@ Runtime.prototype.createBlock = function (block, opt_isFlyoutBlock) {
|
||||||
// Create new block
|
// Create new block
|
||||||
this.blocks[block.id] = block;
|
this.blocks[block.id] = block;
|
||||||
|
|
||||||
// Push block id to stacks array. New blocks are always a stack even if only
|
// Push block id to stacks array.
|
||||||
// momentary. If the new block is added to an existing stack this stack will
|
// Blocks are added as a top-level stack if they are marked as a topBlock
|
||||||
// be removed by the `moveBlock` method below.
|
// (if they were top-level XML in the event) and if they are not
|
||||||
if (!opt_isFlyoutBlock) {
|
// flyout blocks.
|
||||||
|
if (!opt_isFlyoutBlock && block.topBlock) {
|
||||||
this._addStack(block.id);
|
this._addStack(block.id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue