-
Notifications
You must be signed in to change notification settings - Fork 0
fix: update legacy data conversion #139
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ export const convertLegacyData = (data) => { | |
| y: transform.y, | ||
| angle: transform.rotation, | ||
| metadata: props, | ||
| display: 'panelGroup', | ||
| }, | ||
| }); | ||
| } | ||
|
|
@@ -93,6 +94,7 @@ export const convertLegacyData = (data) => { | |
| }, | ||
| attrs: { | ||
| metadata: value.properties, | ||
| display: key.slice(0, -1), | ||
| }, | ||
| }); | ||
| } | ||
|
|
@@ -128,6 +130,7 @@ export const convertLegacyData = (data) => { | |
| x: transform.x, | ||
| y: transform.y, | ||
| metadata: props, | ||
| display: key === 'combines' ? 'combiner' : key.slice(0, -1), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic to determine the display type, For example: const displayType = key === 'combines' ? 'combiner' : key.slice(0, -1);Then use |
||
| }, | ||
| }); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
displayproperty is set to'panelGroup'. In other parts of this function (forstringsand other types), thedisplayvalue is derived from thekeyby removing the trailing 's' (e.g.,'strings'becomes'string'). For consistency, should this be'grid'instead, which would bekey.slice(0, -1)and also matches the elementtypeon line 25? If'panelGroup'is intentional, consider adding a comment to explain why this case is different.