react-diagrams
react-diagrams copied to clipboard
Fix: MOUSE_UP action was ignored if any other mouse button was pressed
Checklist
- [x] The code has been run through pretty
yarn run pretty
- [x] The tests pass on CircleCI
- [x] You have referenced the issue(s) or other PR(s) this fixes/relates-to
- [x] The PR Template has been filled out (see below)
- [x] Had a beer/coffee because you are awesome
What? | Why?
https://github.com/projectstorm/react-diagrams/issues/940
How?
Store pressed mouse button and ignore other events if they contain different button.
Also I did a little refactor, because 9 if-else
is too much :)