Skip to content

2D canvas config confusing #320

@FredrikKarlssonSpeech

Description

@FredrikKarlssonSpeech

I understand that this feature may just be there for the possibility of future expansion, but I got curious about the twoDimCanvas property "order". It seems it is not used, or useful?

I experimented with this setup

        "twoDimCanvases": {
				"order": ["DOTS1","DOTS2"],
				"twoDimDrawingDefinitions": [{
					"name": "DOTS1",
					"dots": [{
						"name": "cppf0",
						"xSsffTrack": "cpp",
						"xContourNr": 0,
						"ySsffTrack": "f0",
						"yContourNr": 0,
						"color": "rgb(255,0,0)"
					}],
					"connectLines": [],
					"staticDots": []
				},
				{
					"name": "DOTS2",
					"dots": [{
						"name": "f0cpp",
						"xSsffTrack": "f0",
						"xContourNr": 0,
						"ySsffTrack": "cpp",
						"yContourNr": 0,
						"color": "rgb(255,0,0)"
					}],
					"connectLines": [],
					"staticDots": []
				}]
			}

which raised the web app error 👍

Error validating ConfigProviderService.vals (emuwebappConfig data) after applying changes of newly loaded config (most likely due to wrong entry...): { "message": "Array is too long (2), maximum 1", "code": 401, "dataPath": "/perspectives/2/twoDimCanvases/order", "schemaPath": "/properties/perspectives/items/properties/twoDimCanvases/properties/order/maxItems", "subErrors": null, "stack": "Error: Array is too long (2), maximum 1\n at new d (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:117076)\n at i.createError (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:98941)\n at i.validateArrayLength (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:107716)\n at i.validateArray (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:107331)\n at i.validateAll (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:103143)\n at i.validateObjectProperties (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:110041)\n at i.validateObject (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:108957)\n at i.validateAll (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:103170)\n at i.validateObjectProperties (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:110041)\n at i.validateObject (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:108957)" }

I can also not remove the redundant orderproperty

Error validating ConfigProviderService.vals (emuwebappConfig data) after applying changes of newly loaded config (most likely due to wrong entry...): { "message": "Missing required property: order", "code": 302, "dataPath": "/perspectives/2/twoDimCanvases", "schemaPath": "/properties/perspectives/items/properties/twoDimCanvases/required/0", "subErrors": null, "stack": "Error: Missing required property: order\n at new d (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:117076)\n at i.createError (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:98941)\n at i.validateObjectRequiredProperties (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:109708)\n at i.validateObject (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:108911)\n at i.validateAll (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:103170)\n at i.validateObjectProperties (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:110041)\n at i.validateObject (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:108957)\n at i.validateAll (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:103170)\n at i.validateArrayItems (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:108691)\n at i.validateArray (http://127.0.0.1:17890/dist/emuwebapp.bundle.js:40:107402)" }

So we have an array that has to be just a single entry for which we have to specify an order, which seems to be a design issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions