Skip to content

Commit

Permalink
Merge pull request #6259 from mozilla/bitecs-object-menu-remove-fix
Browse files Browse the repository at this point in the history
bitECS: Fix hiding the remove button from the object menu
  • Loading branch information
keianhzo authored Sep 15, 2023
2 parents a1d31fa + d5aefe1 commit 8653fdd
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,6 +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 = visible && !isPinned(target);

// Hide unimplemented features for now.
// TODO: Implement and show the buttons.
Expand All @@ -249,7 +250,6 @@ function updateVisibility(world: HubsWorld, menu: EntityID, frozen: boolean) {
world.eid2obj.get(ObjectMenu.refreshButtonRef[menu])!.visible = false;

[
ObjectMenu.removeButtonRef[menu],
ObjectMenu.openLinkButtonRef[menu],
ObjectMenu.cloneButtonRef[menu],
ObjectMenu.rotateButtonRef[menu],
Expand Down

0 comments on commit 8653fdd

Please sign in to comment.