-
Notifications
You must be signed in to change notification settings - Fork 455
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
feat(LengthTool): Added digits configuration for Length tool #1407
feat(LengthTool): Added digits configuration for Length tool #1407
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1407 +/- ##
=======================================
Coverage 19.86% 19.86%
=======================================
Files 286 286
Lines 10133 10133
Branches 2068 2068
=======================================
Hits 2013 2013
Misses 6913 6913
Partials 1207 1207
Continue to review full report at Codecov.
|
@brunoalvesdefaria Since changes are minor, why not adding them to all annotation tools? Otherwise looks great |
Thank you for reviewing it @sedghi! |
Throwing in my 2 cents: if it's implemented at the base annotation level, each tool can choose what it needs to display and can optionally allow for configuration if it makes sense. If you only add it to length, then you have to duplicate code when adding it to the circle annotation, for example. |
I'll summon @swederik to ask his opinion. We have 3 options:
|
I wouldn't do it in BaseAnnotationTool because some tools show more than one value. You might want one level of precision for area and another for mean HU/SUV. I know it's a bit ugly to put it in each tool but it's probably the best option in my opinion. |
🎉 This PR is included in version 5.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
A new feature which enables the configuration of the amount of digits displayed for the Length tool text box.
What is the current behavior? (You can also link to an open issue here)
The current behavior displays always 2 digits for the Length tool text box.
What is the new behavior (if this is a feature change)?
Now it will be possible to add the
digits
attribute to the Length tool's configuration object in order to change the amount of digits to be displayed by the measurements' text box.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No
Other information:
Steps to validade the new behavior:
cornerstoneTools.store.state.tools[20].configuration.digits = 1
;