mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Remove layerOrder property, sprites are rendered in the order the targets are listed in in the .sb2 file.
This commit is contained in:
parent
2508dc46ca
commit
b3ee2c439d
1 changed files with 1 additions and 5 deletions
|
@ -660,11 +660,7 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
|
|||
|
||||
const reorderParsedTargets = function (targets) {
|
||||
// Reorder parsed targets based on the temporary targetPaneOrder property
|
||||
// and also create a layerOrder property to track the sprite's layer ordering.
|
||||
|
||||
targets.forEach((t, index) => {
|
||||
t.layerOrder = index;
|
||||
});
|
||||
// and then delete it.
|
||||
|
||||
targets.sort((a, b) => a.targetPaneOrder - b.targetPaneOrder);
|
||||
|
||||
|
|
Loading…
Reference in a new issue