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:
Karishma Chadha 2018-08-13 14:28:13 -04:00
parent 660d56e9c2
commit 5a9d618a62

View file

@ -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"}
},