Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonl parsing - duplicate objects #814

Open
3 tasks done
smcgann99 opened this issue Oct 12, 2024 · 0 comments
Open
3 tasks done

jsonl parsing - duplicate objects #814

smcgann99 opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@smcgann99
Copy link

smcgann99 commented Oct 12, 2024

Perform all steps below and tick them with [x]

  • Check the related part of the Documentation
  • Update openHASP to the latest version
  • Reproduce the issue and describe all steps

Describe the bug

Sending jsonl for an object twice should first add and then update attributes for the existing object, However when changing its parentid it then creates a second object with the same id, also then allows for obj type to change, so I can create a label and a button with the same id on the same page, in 2 different parents.

To Reproduce

  { "page": 2, "id": 1, "x": 0, "y": 0, "h": 100, "w": 100, "obj": "label", "text": "parent 1", "bg_color": "#DfDf00", "bg_opa": 255 },
  { "page": 2, "id": 2, "x": 110, "y": 110, "h": 100, "w": 100, "obj": "label", "text": "parent 2", "bg_color": "#DfDf00", "bg_opa": 255 },
  { "page": 2, "parentid": 1, "id": 3, "x": 20, "y": 20, "h": 40, "w": 40, "obj": "label", "text": "child", "bg_color": "#550000", "bg_opa": 255 },
  { "page": 2, "parentid": 2, "id": 3, "x": 20, "y": 20, "h": 40, "w": 40, "obj": "btn", "text": "child", "bg_color": "#550000", "bg_opa": 255 },

Expected behaviour

A second object should not be created, the original object should just be updated.

Screenshots or video

@smcgann99 smcgann99 added the bug Something isn't working label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant