-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added feature to display dimensions of rectangles and ellipses #9142
base: develop
Are you sure you want to change the base?
Conversation
|
user-select: none; | ||
pointer-events: none; | ||
} | ||
|
||
.cvat_canvas_text_dimensions { | ||
fill: cyan; |
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.
Why cyan and not white? It feels we have 2 styles for the same thing now
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.
To display different things in different colors
When everything is white, it is more difficult to read
|
||
const normWidth = width.toFixed(1); | ||
const normHeight = height.toFixed(1); | ||
const normRot = state.rotation === 0 ? '' : `${state.rotation.toFixed(1)}\u00B0`; | ||
|
||
block | ||
.tspan(`${normWidth}x${normHeight}px ${normRot}`) |
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.
We have similar code in shared.ts. Maybe there is a way to refactor this logic into separate funciton so we dont do the same thing in 2 places?
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.
At least generation of text
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9142 +/- ##
===========================================
+ Coverage 73.16% 73.17% +0.01%
===========================================
Files 446 446
Lines 45661 45675 +14
Branches 3907 3912 +5
===========================================
+ Hits 33408 33423 +15
+ Misses 12253 12252 -1
|
Motivation and context
Added setting to display shape size of rectangles and ellipses without dragging/resizing them:
How has this been tested?
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.