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

Class DragSourceImpl

packages/dnd-core/src/__tests__/DragSourceImpl.ts:4–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import type { DragDropMonitor, DragSource, Identifier } from '../interfaces.js'
3
4export class DragSourceImpl implements DragSource {
5 public canDrag(_monitor: DragDropMonitor, _targetId: Identifier): boolean {
6 return true
7 }
8
9 public isDragging(monitor: DragDropMonitor, targetId: Identifier): boolean {
10 return targetId === monitor.getSourceId()
11 }
12
13 public beginDrag(_monitor: DragDropMonitor, _targetId: Identifier): void {
14 // empty on purpose
15 }
16
17 public endDrag(_monitor: DragDropMonitor, _targetId: Identifier): void {
18 // empty on purpose
19 }
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…