When scrubbing time, intelligently round to a nice value#11658
Conversation
|
Web viewer failed to build. | Result | Commit | Link | Manifest | View image diff on kitdiff. Note: This comment is updated whenever you push a commit. |
|
I like those round numbers, but what I find super irritating is that I can't click on the time of an event anymore (edit: could I ever though? 🤔 ) even if the hover tooltip pretend that I do. Can we snap to exact times if something was hovered? Demonstrated here: Screen.Recording.2025-10-27.at.11.23.49.mov |
Wumpf
left a comment
There was a problem hiding this comment.
liking the code improvements and mechanics of this, but request-changes on grounds of ⬆️ unless Katya or some product person thinks that's not a problem :)
No, you couldn't ever. Try it on rerun.io/viewer - it's the same behavior there. I'll add it to the parent issue, but it is completely orthogonal to this PR. |
There was a problem hiding this comment.
confirmed, tried it and even the error margin of clicking there feels 100% the same (even though in theory there's some subtle snapping going on, it's visible if one looks ultra closely).
In that case I have nothing to complain about (except for previous very minor comments)! 🚢
Related
What
When dragging the time cursor ("time scrubbing") we would previously pick arbitrarily precise time points, regardless of zoom level. Now, we snap to the "simplest" value that is within a pixel from the mouse cursor. The simplest value is defined as the one with the most trailing zeroes (e.g. prefer
23.500000over23.484793).Before
Even though we zoomed out to where we are viewing full hours, when we try to pick a time we select with microsecond precision:
After
Notice how we start by picking whole multiples of 10s, but as we zoom in we pick multiples of 0.5s, and then 5ms, 10us, etc.
Note that we only ever omit zeroes in the display, so this is a real difference in how values are picked, NOT how they are displayed!
Future work