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: 🎸 Adds a getKeyPressData function will #1083

Merged
merged 2 commits into from
Sep 20, 2019

Conversation

JamesAPetts
Copy link
Member

@JamesAPetts JamesAPetts commented Sep 20, 2019

Adds a util function that consumes a native keydown, keyup or keypress event and returns information about the cornerstone element and the position of the mouse cursor. Useful for "do something to this hovered annotation" functions at the app level.

element.addEventListener('keydown', (evt) => {
  console.log(cornerstoneTools.importInternal('util/getKeyPressData')(evt))
});

Adds a getKeyPressData function to util which takes a keyboard event and
returns information about the focused cornerstone canvas and the mouse
position.
@codecov
Copy link

codecov bot commented Sep 20, 2019

Codecov Report

Merging #1083 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1083      +/-   ##
=========================================
- Coverage   17.32%   17.3%   -0.02%     
=========================================
  Files         271     272       +1     
  Lines        8302    8309       +7     
  Branches     1405    1406       +1     
=========================================
  Hits         1438    1438              
- Misses       5706    5712       +6     
- Partials     1158    1159       +1
Impacted Files Coverage Δ
src/lib.js 100% <ø> (ø) ⬆️
src/util/getKeyPressData.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 208c770...14aa44d. Read the comment docs.

@JamesAPetts JamesAPetts merged commit 6b50c98 into cornerstonejs:master Sep 20, 2019
@dannyrb
Copy link
Member

dannyrb commented Sep 20, 2019

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

2 participants