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

feat: 🎸 Dashed rendering options for tools with lines/handles #1254

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

JamesAPetts
Copy link
Member

@JamesAPetts JamesAPetts commented Jun 24, 2020

Dashed line rendering options for all tools.

Open the console and paste:

const tools = cornerstoneTools.store.state.tools;
tools.forEach(tool => { const config = tool.configuration;  config.renderDashed = true; tool.configuration = config});

And all tools will be rendered in dashed mode. This can be done per tool, so you could have dashed in one viewport and solid in another.

The dash style is set in the globalConfiguation module, with a default lineDash of [4,4].

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #1254 into master will decrease coverage by 0.06%.
The diff coverage is 14.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1254      +/-   ##
==========================================
- Coverage   19.03%   18.97%   -0.07%     
==========================================
  Files         286      286              
  Lines        8584     8629      +45     
  Branches     1459     1471      +12     
==========================================
+ Hits         1634     1637       +3     
- Misses       5759     5790      +31     
- Partials     1191     1202      +11     
Impacted Files Coverage Δ
src/drawing/drawArrow.js 0.00% <0.00%> (ø)
src/store/modules/globalConfigurationModule.js 100.00% <ø> (ø)
src/tools/annotation/ArrowAnnotateTool.js 0.00% <0.00%> (ø)
src/tools/annotation/BidirectionalTool.js 5.00% <ø> (ø)
src/tools/annotation/CircleRoiTool.js 33.02% <0.00%> (-1.26%) ⬇️
src/tools/annotation/CobbAngleTool.js 0.00% <0.00%> (ø)
src/tools/annotation/EllipticalRoiTool.js 28.18% <0.00%> (-1.07%) ⬇️
src/tools/annotation/FreehandRoiTool.js 4.70% <0.00%> (-0.04%) ⬇️
src/tools/annotation/RectangleRoiTool.js 38.88% <0.00%> (-1.28%) ⬇️
...ols/annotation/bidirectionalTool/renderToolData.js 1.96% <0.00%> (-0.27%) ⬇️
... and 4 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 c07c3bf...e14c795. Read the comment docs.

@dannyrb
Copy link
Member

dannyrb commented Jun 24, 2020

Is the lineDash hard coded? [4, 4]
I think that's fine for now.

Long-term, it would be nice if tools/annotations had a way to override toolStyle in a consistent/granular way.

Thanks for authoring this PR

@JamesAPetts
Copy link
Member Author

@dannyrb

Is the lineDash hard coded? [4, 4]

That's just the default, you can set it in the globalConfiguration module.

@JamesAPetts JamesAPetts merged commit aa54b30 into cornerstonejs:master Jun 24, 2020
@dannyrb
Copy link
Member

dannyrb commented Jun 24, 2020

🎉 This PR is included in version 4.16.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