Skip to content

Commit

Permalink
Merge pull request #6460 from mozilla/bitecs-fix-object-menu-buttons-…
Browse files Browse the repository at this point in the history
…layout

Fix position of inspect buttons when the object is droppable
  • Loading branch information
keianhzo authored Jan 25, 2024
2 parents a088649 + 928d14a commit 4586072
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bit-systems/object-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,10 @@ function updateVisibility(world: HubsWorld, menu: EntityID, frozen: boolean) {
mirrorButtonObj.position.fromArray(ObjectMenuPositions.mirror);
if (isEntityPinned) {
inspectButtonObj.position.fromArray(ObjectMenuPositions.inspectP);
} else {
} else if (isVideoImagePdf) {
inspectButtonObj.position.fromArray(ObjectMenuPositions.inspect);
} else {
inspectButtonObj.position.fromArray(ObjectMenuPositions.inspectM);
}
refreshButtonObj.position.fromArray(ObjectMenuPositions.refresh);

Expand Down
1 change: 1 addition & 0 deletions src/prefabs/object-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export const ObjectMenuPositions = {
remove: [ 0, -0.075, uiZ] as ArrayVec3,
drop: [ 0, -0.225, uiZ] as ArrayVec3,
inspect: [ 0, -0.225, uiZ] as ArrayVec3,
inspectM: [ 0, -0.375, uiZ] as ArrayVec3,
inspectU: [ 0, 0.075, uiZ] as ArrayVec3,
inspectP: [ 0, -0.075, uiZ] as ArrayVec3,
deserializeDrawing: [ -0.3, -0.425, uiZ] as ArrayVec3,
Expand Down

0 comments on commit 4586072

Please sign in to comment.