mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-26 06:10:26 -04:00
Allow for situation where we get a move event to attach a shadow.
This happens after adding a custom procedure input to an existing custom procedure call block.
This commit is contained in:
parent
19a4329c8b
commit
2b53b8b647
2 changed files with 43 additions and 0 deletions
src/engine
|
@ -735,6 +735,12 @@ class Blocks {
|
|||
if (this._blocks[e.newParent].inputs.hasOwnProperty(e.newInput)) {
|
||||
oldShadow = this._blocks[e.newParent].inputs[e.newInput].shadow;
|
||||
}
|
||||
|
||||
// If the block being attached is itself a shadow, make sure to set
|
||||
// both block and shadow to that blocks ID. This happens when adding
|
||||
// inputs to a custom procedure.
|
||||
if (this._blocks[e.id].shadow) oldShadow = e.id;
|
||||
|
||||
this._blocks[e.newParent].inputs[e.newInput] = {
|
||||
name: e.newInput,
|
||||
block: e.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue