fix: timeline tooltip positioning to account for left padding

- Add controlsWidth offset to tooltip left position
- Tooltip now appears correctly at mouse cursor position

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-20 10:36:40 +01:00
parent 1855988b83
commit adcc97eb5a

View File

@@ -252,8 +252,8 @@ export function TimeScale({
className="absolute top-full mt-1 px-2 py-1 bg-popover border border-border rounded shadow-lg text-xs font-mono pointer-events-none z-10"
style={{
left: `${Math.min(
viewportWidth - 60,
Math.max(0, (hoverTime / duration) * totalWidth - scrollLeft - 30)
viewportWidth - 60 + controlsWidth,
Math.max(controlsWidth, (hoverTime / duration) * totalWidth - scrollLeft - 30 + controlsWidth)
)}px`,
}}
>