Skip to content
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

fix: state setter for download aspect toggle #3188

Open
wants to merge 1 commit into
base: v2-legacy
Choose a base branch
from

Conversation

slak44
Copy link
Contributor

@slak44 slak44 commented Feb 22, 2023

Context

Clicking the aspect ratio button in the ViewportDownloadForm fails due to an error. When shadowing a class member name in js, you can't use the shadowed name to initialize the shadowing variable.

image

Changes & Results

I fixed the syntax to avoid the error, and used the setter with callback, which should always be used when the new state depends on the current state in react.

Testing

Click the aspect ratio button, and it will now work.

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #3188 (97d24c3) into master (fe57c00) will decrease coverage by 0.74%.
The diff coverage is 2.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3188      +/-   ##
==========================================
- Coverage   12.68%   11.94%   -0.74%     
==========================================
  Files         306      306              
  Lines        8233     8437     +204     
  Branches     1593     1678      +85     
==========================================
- Hits         1044     1008      -36     
- Misses       5797     5943     +146     
- Partials     1392     1486      +94     
Impacted Files Coverage Δ
...latform/core/src/DICOMSR/SCOORD3D/parseSCOORD3D.js 2.66% <0.00%> (-0.73%) ⬇️
.../core/src/DICOMSR/SCOORD3D/utils/addMeasurement.js 5.40% <ø> (ø)
...re/src/DICOMSR/SCOORD3D/utils/getRenderableData.js 1.72% <0.00%> (-0.07%) ⬇️
...orm/core/src/DICOMSR/parseDicomStructuredReport.js 7.50% <0.00%> (-1.60%) ⬇️
platform/core/src/classes/HotkeysManager.js 76.66% <0.00%> (ø)
platform/core/src/classes/StudyLoadingListener.js 1.03% <0.00%> (+0.01%) ⬆️
...latform/core/src/classes/metadata/StudyMetadata.js 1.25% <0.00%> (-0.04%) ⬇️
.../core/src/measurements/tools/dicomSRDisplayTool.js 50.00% <0.00%> (ø)
...udies/services/wado/getReferencedSeriesSequence.js 7.69% <0.00%> (-0.65%) ⬇️
.../src/studies/services/wado/studyInstanceHelpers.js 1.56% <0.00%> (-0.48%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30515b8...97d24c3. Read the comment docs.

@sedghi sedghi changed the base branch from master to v2-legacy June 19, 2023 13:27
@sedghi sedghi added the v2-legacy OHIF v2 label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2-legacy OHIF v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants