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

Dynamically update CompoundBody shapes #288

Open
krispya opened this issue Sep 30, 2021 · 1 comment
Open

Dynamically update CompoundBody shapes #288

krispya opened this issue Sep 30, 2021 · 1 comment

Comments

@krispya
Copy link
Member

krispya commented Sep 30, 2021

I am trying to dynamically update the useCompoundBody shape so that the bounding box changes without having to reinitialize the component. Here is a CodeSandbox example: https://codesandbox.io/s/dynamically-update-compoundbody-nkzu0?file=/src/App.js

I expect that when the shape state changes that all the CompoundBody components update to match. Am I wrong to expect this? And if so, is there a preferred way to update the bounding box dynamically?

@krispya
Copy link
Member Author

krispya commented Oct 2, 2021

This was the closest I could come up with: https://codesandbox.io/s/dynamically-update-compoundbody-v2-4k93f?file=/src/App.js

Note the rotation issues will be fixed with the latest PR.

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

No branches or pull requests

1 participant