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

[bugfix] Remove debounce of rebuildEntityOptions in SceneGraph to fix expand issue to created element #747

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

vincentfretin
Copy link
Contributor

@vincentfretin vincentfretin commented Aug 17, 2024

Remove debounce of rebuildEntityOptions. It is not needed and it added 1s of delay of refreshing the UI when changing a mixin or creating a new element. This fixes expanding the tree to a created element as a child of another collapsed element. (when done programmatically, there is no ui or shortcut to do that currently in aframe inspector)
Reduce updateFilteredEntities debounce from 500ms to 100ms so the filter is quicker.

The rebuildEntityOptions debounce may have been needed in the past for some reason, but in the current code the only time rebuildEntityOptions is called is on the following events that are seldom emitted

Events.on('entityidchange', this.rebuildEntityOptions);
Events.on('entitycreated', this.rebuildEntityOptions);
Events.on('entityclone', this.rebuildEntityOptions);
Events.on('entityupdate', (detail) => {
if (detail.component === 'mixin') {
this.rebuildEntityOptions();
}

…d 1s of delay of refreshing the UI when changing a mixin or creating a new element. This fixes expanding the tree to a created element as a child of another collapsed element. Reduce updateFilteredEntities debounce from 500ms to 100ms so the filter is quicker.
@vincentfretin vincentfretin changed the title [bugfix] Remove debounce of rebuildEntityOptions and updateFilteredEntities in SceneGraph [bugfix] Remove debounce of rebuildEntityOptions in SceneGraph to fix expand issue to created element Aug 17, 2024
@dmarcos
Copy link
Member

dmarcos commented Aug 19, 2024

Thanks so much!

@dmarcos
Copy link
Member

dmarcos commented Aug 19, 2024

Thank you!

@dmarcos dmarcos merged commit be26547 into aframevr:master Aug 19, 2024
1 check passed
@vincentfretin vincentfretin deleted the scenegraph-remove-debounce branch August 20, 2024 06:49
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.

2 participants