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 rotate tool on mobile devices #1385

Merged

Conversation

Zckr07
Copy link
Contributor

@Zckr07 Zckr07 commented May 21, 2021

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    • Bug fix: The RotateTool does not work on mobile device.
  • What is the current behavior? (You can also link to an open issue here)

    • The RotateTool does not work on mobile devices. viewport.initialRotation is undefined
  • What is the new behavior (if this is a feature change)?

    • The RotateTool works fine on mobile devices.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

  • Other information:
    I modified function defaultStrategy(evt) in RotateTool.js.

@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #1385 (ac7f9e1) into master (291b8e9) will increase coverage by 0.60%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1385      +/-   ##
==========================================
+ Coverage   18.93%   19.53%   +0.60%     
==========================================
  Files         286      286              
  Lines        8684    10122    +1438     
  Branches     1486     2068     +582     
==========================================
+ Hits         1644     1977     +333     
- Misses       5827     6931    +1104     
- Partials     1213     1214       +1     
Impacted Files Coverage Δ
src/tools/RotateTool.js 16.66% <0.00%> (+3.03%) ⬆️
src/util/getPixelSpacing.js 57.14% <0.00%> (-17.86%) ⬇️
src/stateManagement/textStyle.js 25.00% <0.00%> (-15.00%) ⬇️
src/store/modules/cursorModule.js 66.66% <0.00%> (-13.34%) ⬇️
src/externalModules.js 20.00% <0.00%> (-13.34%) ⬇️
src/stateManagement/toolCoordinates.js 20.00% <0.00%> (-13.34%) ⬇️
src/drawing/drawLine.js 87.50% <0.00%> (-12.50%) ⬇️
src/stateManagement/toolStyle.js 45.45% <0.00%> (-11.69%) ⬇️
src/stateManagement/toolColors.js 30.00% <0.00%> (-8.47%) ⬇️
src/eventListeners/internals/renderSegmentation.js 5.55% <0.00%> (-5.56%) ⬇️
... and 260 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 94b7283...ac7f9e1. Read the comment docs.

@Zckr07
Copy link
Contributor Author

Zckr07 commented May 21, 2021

Can someone tellme what's the problem with codecov/patch? i added test code on RotateTool.test.js

@swederik swederik merged commit cdf23b5 into cornerstonejs:master Jul 30, 2021
@swederik
Copy link
Member

Thanks!

@dannyrb
Copy link
Member

dannyrb commented Jul 30, 2021

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants