-
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(BidirectionalTool): Update tool data on every modified event of … #882
Conversation
Codecov Report
@@ Coverage Diff @@
## master #882 +/- ##
==========================================
+ Coverage 10.73% 10.97% +0.24%
==========================================
Files 212 213 +1
Lines 6848 6853 +5
Branches 1089 1089
==========================================
+ Hits 735 752 +17
+ Misses 5152 5146 -6
+ Partials 961 955 -6
Continue to review full report at Codecov.
|
37a51c4
to
023be5f
Compare
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.test.js
Outdated
Show resolved
Hide resolved
src/tools/annotation/bidirectionalTool/utils/calculateLongestAndShortestDiameters.js
Show resolved
Hide resolved
@@ -50,6 +51,33 @@ export default function( | |||
EVENTS.MEASUREMENT_MODIFIED, | |||
modifiedEventData | |||
); | |||
|
|||
const measurementModifiedHandler = () => { |
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 current moveHandle
(generic) accomplishes this by setting the tool's annotation data to invalidated
. Then, in the render loop, if we see invalidated
, we can run the calculate method to grab updated data and inform measurement modified subscribers.
This has the advantage of only needing to call the method in one place.
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 have done a small refactor, I am now just calculating and triggering the measurement modified.
The measurement table uses this measurement modified to update the table. I will think later on something cleaner for other annotationTools.
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.
The only stop for me on this is the unit test language, and we can discuss it further as it's mostly a matter of preference. My hope is that the title's I've suggested make it easier to grok, at a glance, the expected behavior of what we're testing.
All of the other implementation details are okay as-is, just floating alternative ideas.
It looks like CI is failing. Can you sync it with the base branch and resolve any issues? Feel free to ping me if the mistake/hold-up is on my end. |
…Bidirectional so we can display
… the data once we addNewMeasurement
c71c76b
to
e90a7ad
Compare
@dannyrb Just rebased my branch. |
Do the tests pass when you change: cornerstoneTools/.circleci/config.yml Line 6 in e90a7ad
To:
|
Hmm.. Apparently not. My next best guess would be a cache issue with packages then? You could try commenting out the save/restore cache portions of the CI config? I'll look into this issue more next week if you don't have the time right now. |
270d8ca
to
f620ed0
Compare
Thanks, @galelis! |
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue
Fix