From 928d14ad46c95fa61d0df9d373aca5e1676d6b8e Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Thu, 25 Jan 2024 18:14:34 +0100 Subject: [PATCH] Fix position of inspect buttons when the object is droppable --- src/bit-systems/object-menu.ts | 4 +++- src/prefabs/object-menu.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bit-systems/object-menu.ts b/src/bit-systems/object-menu.ts index fcfb8ffc8..51c6702a7 100644 --- a/src/bit-systems/object-menu.ts +++ b/src/bit-systems/object-menu.ts @@ -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); diff --git a/src/prefabs/object-menu.tsx b/src/prefabs/object-menu.tsx index d2677a9b6..a048481d7 100644 --- a/src/prefabs/object-menu.tsx +++ b/src/prefabs/object-menu.tsx @@ -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,