Skip to content

Centralize Hover Detection and Improve Line Interaction Precision - #105

Merged
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
Abse2001:main
Mar 26, 2026
Merged

Centralize Hover Detection and Improve Line Interaction Precision#105
ShiboSoftwareDev merged 1 commit into
tscircuit:mainfrom
Abse2001:main

Conversation

@Abse2001

@Abse2001 Abse2001 commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Motivation

Currently, hovering over traces is unreliable unless the user zooms in significantly. Thin lines and small segments are especially hard to interact with, leading to missed hovers and inconsistent behavior.

Fix

This change replaces the existing hover model with a distance-based hit detection approach driven by a global mouse position:

Computes distance from cursor to line segments instead of relying on bounding boxes
Introduces a dynamic hover radius based on stroke width
Centralizes mouse tracking instead of per-element event handlers

Before

Screen.Recording.2026-03-26.at.6.52.29.PM.mov

After

Screen.Recording.2026-03-26.at.6.51.23.PM.mov

@vercel

vercel Bot commented Mar 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graphics-debug Ready Ready Preview, Comment Mar 26, 2026 1:36pm

Request Review

@ShiboSoftwareDev
ShiboSoftwareDev merged commit 7b27efd into tscircuit:main Mar 26, 2026
3 checks passed
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants