mirror of
https://github.com/scratchfoundation/scratch-parser.git
synced 2025-08-28 22:18:45 -04:00
fix(sb3_definitions): fix comment position validation
A comment's x and y can be null. This will occur if a project is imported from 2.0, a sprite that is not currently selected has comments, and that project is immediately saved in 3.0 without switching to the other sprite that has comments.
This commit is contained in:
parent
660d56e9c2
commit
5a9d618a62
1 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,12 @@
|
|||
{"type": "null"}
|
||||
]
|
||||
},
|
||||
"optionalNumber": {
|
||||
"oneOf": [
|
||||
{"type": "number"},
|
||||
{"type": "null"}
|
||||
]
|
||||
},
|
||||
"boolOrOptBoolString": {
|
||||
"oneOf": [
|
||||
{"type": "string",
|
||||
|
@ -294,8 +300,8 @@
|
|||
"maxLength": 8000
|
||||
},
|
||||
"minimized": {"type": "boolean"},
|
||||
"x": {"type": "number"},
|
||||
"y": {"type": "number"},
|
||||
"x": {"$ref": "#/definitions/optionalNumber"},
|
||||
"y": {"$ref": "#/definitions/optionalNumber"},
|
||||
"width": {"type": "number"},
|
||||
"height": {"type": "number"}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue