fix: center crosshairs and re-enable pointer lock after escape
**Crosshair positioning:** - Fix vertical line: left: 50%, top: 0 (was top: 50%) - Fix horizontal line: left: 0, top: 50% (was left: 50%) - Both now properly centered in the circle **Re-enable pointer lock:** - Show prompt overlay again when pointer lock is released - User can press Escape to exit, then click to re-enter - Handles both user-initiated unlock (Escape) and errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,9 @@ export function MapRenderer({
|
||||
setPointerLocked(isLocked)
|
||||
if (isLocked) {
|
||||
setShowLockPrompt(false) // Hide prompt when locked
|
||||
} else {
|
||||
// Show prompt again when lock is released (e.g., user hit Escape)
|
||||
setShowLockPrompt(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1355,22 +1358,23 @@ export function MapRenderer({
|
||||
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.3)',
|
||||
}}
|
||||
>
|
||||
{/* Crosshair */}
|
||||
{/* Crosshair - Vertical line */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
left: '50%',
|
||||
top: '50%',
|
||||
top: '0',
|
||||
width: '2px',
|
||||
height: '100%',
|
||||
backgroundColor: isDark ? '#60a5fa' : '#3b82f6',
|
||||
transform: 'translateX(-50%)',
|
||||
}}
|
||||
/>
|
||||
{/* Crosshair - Horizontal line */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
left: '50%',
|
||||
left: '0',
|
||||
top: '50%',
|
||||
width: '100%',
|
||||
height: '2px',
|
||||
|
||||
Reference in New Issue
Block a user