renew-js / renew-lib

Core component of renew-js for displaying and modifying drawings
Other
0 stars 0 forks source link

Keyboard events #83

Closed 0x4d closed 5 years ago

0x4d commented 5 years ago

Closes #81

Describe your changes

I added a new module KeyboardEvents that add listeners for keyup and keydown that propagate events to the EventBus. I then added behaviors to the Toolbox and Remove modules for these events. I decided not to use the diagram-js keyboard module for this because it is to extensive and does not use our concept of behaviors.

codecov[bot] commented 5 years ago

Codecov Report

Merging #83 into master will increase coverage by 0.95%. The diff coverage is 79.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #83      +/-   ##
==========================================
+ Coverage   60.94%   61.89%   +0.95%     
==========================================
  Files          95      100       +5     
  Lines        1170     1215      +45     
==========================================
+ Hits          713      752      +39     
- Misses        457      463       +6
Impacted Files Coverage Δ
src/Modeler.js 100% <ø> (ø) :arrow_up:
.../features/selection/providers/SelectionProvider.js 80% <0%> (+24.44%) :arrow_up:
...atures/keyboard-events/providers/KeyboardEvents.js 100% <100%> (ø)
...atures/keyboard-events/behaviors/AttachBehavior.js 100% <100%> (ø)
...atures/keyboard-events/behaviors/DetachBehavior.js 100% <100%> (ø)
.../features/remove/commands/RemoveElementsCommand.js 89.28% <100%> (+4.28%) :arrow_up:
src/features/remove/behaviors/KeypressBehavior.js 33.33% <33.33%> (ø)
src/core/toolbox/behaviors/KeypressBehavior.js 57.14% <57.14%> (ø)
... and 5 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 5a09726...7e036a9. Read the comment docs.