mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Add shadow, x, y properties to block adapter
This commit is contained in:
parent
8339e2769f
commit
aa70c1bc3b
1 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,10 @@ function domToBlock (blockDOM, blocks, isTopBlock) {
|
||||||
inputs: {}, // Inputs to this block and the blocks they point to.
|
inputs: {}, // Inputs to this block and the blocks they point to.
|
||||||
fields: {}, // Fields on this block and their values.
|
fields: {}, // Fields on this block and their values.
|
||||||
next: null, // Next block in the stack, if one exists.
|
next: null, // Next block in the stack, if one exists.
|
||||||
topLevel: isTopBlock // If this block starts a stack.
|
topLevel: isTopBlock, // If this block starts a stack.
|
||||||
|
shadow: blockDOM.name == 'shadow', // If this represents a shadow/slot.
|
||||||
|
x: blockDOM.attribs.x, // X position of script, if top-level.
|
||||||
|
y: blockDOM.attribs.y // Y position of script, if top-level.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the block to the representation tree.
|
// Add the block to the representation tree.
|
||||||
|
|
Loading…
Reference in a new issue