react-diagrams icon indicating copy to clipboard operation
react-diagrams copied to clipboard

Fix: MOUSE_UP action was ignored if any other mouse button was pressed

Open ToTheHit opened this issue 2 years ago • 0 comments

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 :)

Feel good image:

6e88d91e1473a36ea8aaba8cd6a4eaaf

ToTheHit avatar May 09 '22 09:05 ToTheHit