diff --git a/pwa/src/components/game/LocationView.css b/pwa/src/components/game/LocationView.css index c16274f..2244e09 100644 --- a/pwa/src/components/game/LocationView.css +++ b/pwa/src/components/game/LocationView.css @@ -8,10 +8,21 @@ /* Ensure padding inside container */ } +/* Padded Image for enemies */ /* Padded Image for enemies */ .padded-image { padding: 10px; box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; +} + +.padded-image img { + object-fit: contain !important; + /* Ensure enemies don't get cropped by cover if padded */ } /* Remove old expanded grid styles */ diff --git a/pwa/src/components/game/LocationView.tsx b/pwa/src/components/game/LocationView.tsx index 90d8538..d1dbd49 100644 --- a/pwa/src/components/game/LocationView.tsx +++ b/pwa/src/components/game/LocationView.tsx @@ -102,11 +102,10 @@ function LocationView({ if (activeDropdown === id) { setActiveDropdown(null) } else { - const rect = e.currentTarget.getBoundingClientRect() - // Fix: GameDropdown uses fixed positioning, so we don't add scroll offsets + // Use mouse position for grid-like dropdown behavior setDropdownPos({ - x: rect.left, - y: rect.bottom + 5 + x: e.clientX, + y: e.clientY }) setActiveDropdown(id) }