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

Protect against null viewport pixelSpacing #826

Merged

Conversation

dannyrb
Copy link
Member

@dannyrb dannyrb commented Feb 11, 2019

Our viewport pixel spacings can be null, which results in a 0 width/height for the layerCanvas, which causes an exception.

We can either bail out early, or assume a 1:1 pixelSpacing in this situation

@codecov
Copy link

codecov bot commented Feb 11, 2019

Codecov Report

Merging #826 into feature/overlay-tool will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           feature/overlay-tool     #826      +/-   ##
========================================================
- Coverage                 10.77%   10.77%   -0.01%     
========================================================
  Files                       210      210              
  Lines                      6802     6803       +1     
  Branches                   1075     1075              
========================================================
  Hits                        733      733              
- Misses                     5121     5122       +1     
  Partials                    948      948
Impacted Files Coverage Δ
src/tools/OverlayTool.js 0% <0%> (ø) ⬆️

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 6c663a0...f0d634e. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Feb 11, 2019

Codecov Report

Merging #826 into feature/overlay-tool will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           feature/overlay-tool     #826      +/-   ##
========================================================
- Coverage                 10.77%   10.77%   -0.01%     
========================================================
  Files                       210      210              
  Lines                      6802     6803       +1     
  Branches                   1075     1075              
========================================================
  Hits                        733      733              
- Misses                     5121     5122       +1     
  Partials                    948      948
Impacted Files Coverage Δ
src/tools/OverlayTool.js 0% <0%> (ø) ⬆️

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 6c663a0...f0d634e. Read the comment docs.

@dannyrb dannyrb merged commit 6c7581d into cornerstonejs:feature/overlay-tool Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant