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

deepDelete is this function working correctly? #268

Open
michal-repo opened this issue Jun 26, 2023 · 0 comments
Open

deepDelete is this function working correctly? #268

michal-repo opened this issue Jun 26, 2023 · 0 comments

Comments

@michal-repo
Copy link

I think that deepDelete from src/utils/deepDelete.js is not working correctly.

I can see that there is different version in examples/utils/deepDelete.js

Here is code example:
https://codesandbox.io/s/exciting-antonelli-svcfcm?file=/src/index.js

../three-mesh-ui-6.5.4/utils/deepDelete.js is src/utils/deepDelete.js version
../three-mesh-ui-6.5.4/utils/deepDelete2.js is examples/utils/deepDelete.js version
I have added some console logs.

There is one Block on scene (cube) with child Block (cube1) that have child InlineBlock in it.
cube
|_cube1
|_imgBlock

When running deepDelete from src/utils version there is only one log with top Block.

If you change import to deepDelete2 examples/utils version suddenly all children are logged in console and looks like removed correctly.

Which version of deepDelete is correct and should be used to remove objects?

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