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.28k stars 783 forks source link

Prevent dragging, if multi-touch occurs. #936

Open KLA6 opened 2 years ago

KLA6 commented 2 years ago

Expected behavior

Prevent dragging, if multi-touch occurs. In other words, drag-able by only single-touch. How can I allow .draggable, when the user uses only one finger...?

FYI, at the moment, I've made other event handlers to count touch points, but I'm just curious whether I can make the code simpler within this library.

Actual behavior

I've tried to use .gesturable to figure out single or multi touch, but it seems it always recognize the touches as multi. Also, I've tried to check all values in event of .draggable, but it seems there is no info about the count of touch points.

System configuration

interact.js version: 1.10.11 Browser name and version: Chrome 95.0.4638.54 Operating System: Windows 10

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

taye commented 2 years ago

Relates to #794