Skip to content

Commit

Permalink
Check visible state when hiding the remove button
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Sep 15, 2023
1 parent 82a1e3f commit d5aefe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bit-systems/object-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function updateVisibility(world: HubsWorld, menu: EntityID, frozen: boolean) {
world.eid2obj.get(ObjectMenu.unpinButtonRef[menu])!.visible = visible && isPinned(target);
world.eid2obj.get(ObjectMenu.pinButtonRef[menu])!.visible =
visible && !isPinned(target) && canPin(APP.hubChannel!, target);
world.eid2obj.get(ObjectMenu.removeButtonRef[menu])!.visible = !isPinned(target);
world.eid2obj.get(ObjectMenu.removeButtonRef[menu])!.visible = visible && !isPinned(target);

// Hide unimplemented features for now.
// TODO: Implement and show the buttons.
Expand Down

0 comments on commit d5aefe1

Please sign in to comment.