taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.19k stars 782 forks source link

mouseButtons typescript type definitions #1037

Open micvm opened 2 months ago

micvm commented 2 months ago

I've used and have been using interact.js successfully with mouseButton value "3", which enables dragging via left as well as right mouse button. However, the typescript type does not include that as valid value. Would it be possible to add or are there any issues using value 3?

System configuration

interact.js version: 1.10.27 Browser name and version: all Operating System: all

WindySpoon commented 1 month ago

I myself have been using mouseButtons: 7 which enables dragging via left, right, and middle mouse button. I may be mistaken but I believe that a bitwise OR operation is being done to determine what buttons are allowed. But it would be nice if the typescript type was updated to allow all of this, in the meantime I will use // @ts-ignore.