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

fix: align object's children to keep the consistency of graph illustration #268

Merged
merged 2 commits into from
Dec 31, 2022

Conversation

hanbin9775
Copy link
Contributor

Issue: #266

Solved the issue by aligning object type node's children with sort method.
I checked traverse function performance with performance api.

      const t0 = performance.now();
      traverse(json);
      const t1 = performance.now();
      console.log(`traverse() with sorting children took ${t1 - t0} ms`);

test data

as-is
스크린샷 2022-11-25 오전 12 49 33

to-be
스크린샷 2022-11-25 오전 12 50 44

@hanbin9775
Copy link
Contributor Author

Any feedback would be greatly appreciated.
cc. @AykutSarac

@AykutSarac
Copy link
Owner

Looks like it overrides the parent parameter of calculateSize function, can we merge with main branch and implement the changes then?

@hanbin9775
Copy link
Contributor Author

Oh the reason parent parameter was overriden is that my pr was created before the #264 merge.
I will rebase based on the current main branch. Thanks for reviewing!

@hanbin9775
Copy link
Contributor Author

Rebase done! All good to merge!

@AykutSarac AykutSarac merged commit e488ff5 into AykutSarac:main Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants