MCPcopy
hub / github.com/react-dnd/react-dnd / eventShouldEndDrag

Function eventShouldEndDrag

packages/backend-touch/src/utils/predicates.ts:31–35  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

29 * @param {MouseEvent | TouchEvent} e The event
30 */
31export function eventShouldEndDrag(e: MouseEvent): boolean {
32 // Touch events will have buttons be undefined, while mouse events will have e.buttons's left button
33 // bit field unset if the left mouse button has been released
34 return e.buttons === undefined || (e.buttons & MouseButtons.Left) === 0
35}
36
37export function isTouchEvent(
38 e: Touch | TouchEvent | MouseEvent,

Callers 1

TouchBackendImplClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…