mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Don't serialize layerOrder when exporting a sprite.
This commit is contained in:
parent
ac550d2d38
commit
53ccb8d709
1 changed files with 3 additions and 1 deletions
|
@ -485,7 +485,9 @@ const serialize = function (runtime, targetId) {
|
||||||
|
|
||||||
const flattenedOriginalTargets = JSON.parse(JSON.stringify(originalTargetsToSerialize));
|
const flattenedOriginalTargets = JSON.parse(JSON.stringify(originalTargetsToSerialize));
|
||||||
|
|
||||||
if (runtime.renderer) {
|
// If the renderer is attached, and we're serializing a whole project (not a sprite)
|
||||||
|
// add a temporary layerOrder property to each target.
|
||||||
|
if (runtime.renderer && !targetId) {
|
||||||
flattenedOriginalTargets.forEach((t, index) => {
|
flattenedOriginalTargets.forEach((t, index) => {
|
||||||
t.layerOrder = layerOrdering[index];
|
t.layerOrder = layerOrdering[index];
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue