projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.45k stars 1.16k forks source link

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

Open ToTheHit opened 2 years ago

ToTheHit commented 2 years ago

Checklist

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