Skip to content

Commit

Permalink
Update visibility icon in scene graph if you change the visible check…
Browse files Browse the repository at this point in the history
…box in right panel
  • Loading branch information
vincentfretin committed Sep 9, 2024
1 parent 329f801 commit 8424ab7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/scenegraph/SceneGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default class SceneGraph extends React.Component {
);
}

onMixinUpdate = (detail) => {
if (detail.component === 'mixin') {
onEntityUpdate = (detail) => {
if (detail.component === 'mixin' || detail.component === 'visible') {
this.rebuildEntityOptions();
}
};
Expand All @@ -47,14 +47,14 @@ export default class SceneGraph extends React.Component {
Events.on('entityidchange', this.rebuildEntityOptions);
Events.on('entitycreated', this.rebuildEntityOptions);
Events.on('entityclone', this.rebuildEntityOptions);
Events.on('entityupdate', this.onMixinUpdate);
Events.on('entityupdate', this.onEntityUpdate);
}

componentWillUnmount() {
Events.off('entityidchange', this.rebuildEntityOptions);
Events.off('entitycreated', this.rebuildEntityOptions);
Events.off('entityclone', this.rebuildEntityOptions);
Events.off('entityupdate', this.onMixinUpdate);
Events.off('entityupdate', this.onEntityUpdate);
}

/**
Expand Down

0 comments on commit 8424ab7

Please sign in to comment.