mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-07 19:14:40 -04:00
Clean up comment serialization, add tests for new and old serialization (old is still valid, just more verbose).
This commit is contained in:
parent
29b79878bc
commit
f3d49f75c8
3 changed files with 77 additions and 2 deletions
src/serialization
|
@ -395,7 +395,6 @@ const serializeComments = function (comments) {
|
|||
const comment = comments[commentId];
|
||||
|
||||
const serializedComment = Object.create(null);
|
||||
serializedComment.id = comment.id;
|
||||
serializedComment.blockId = comment.blockId;
|
||||
serializedComment.x = comment.x;
|
||||
serializedComment.y = comment.y;
|
||||
|
@ -864,7 +863,7 @@ const parseScratchObject = function (object, runtime, extensions, zip) {
|
|||
for (const commentId in object.comments) {
|
||||
const comment = object.comments[commentId];
|
||||
const newComment = new Comment(
|
||||
comment.id,
|
||||
commentId,
|
||||
comment.text,
|
||||
comment.x,
|
||||
comment.y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue