-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Show vector values in tooltip #479
Conversation
|
Coverage Report
File Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works when I run it.
Some merge conflicts, but otherwise good to go.
src/Viewer.tsx
Outdated
<p key="vector_components"> | ||
{vectorName}: ({numberToStringDecimal(motionDelta[0], 3, allowIntegerTruncation)},{" "} | ||
{numberToStringDecimal(motionDelta[1], 3, allowIntegerTruncation)}) px | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't typically like to have this much data grooming mixed up with rendering. I think this would be a lot easier to follow if you had a separate function that checked for and got the appropriate data and another one that created the
and pushed it to the array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code in Viewer.tsx
could use some work, but I'm also pretty late on this review, so up to you
Problem
Closes #473, "Show vector values in tooltip".
Estimated review size: small, 10 minutes
Solution
Type of change
Steps to Verify:
Screenshots (optional):
Magnitude + angle:
Components: