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:
@@ -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"
|
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={{
|
style={{
|
||||||
left: `${Math.min(
|
left: `${Math.min(
|
||||||
viewportWidth - 60,
|
viewportWidth - 60 + controlsWidth,
|
||||||
Math.max(0, (hoverTime / duration) * totalWidth - scrollLeft - 30)
|
Math.max(controlsWidth, (hoverTime / duration) * totalWidth - scrollLeft - 30 + controlsWidth)
|
||||||
)}px`,
|
)}px`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user