MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / canDragSource

Method canDragSource

packages/dnd-core/src/DragDropMonitor.js:66–75  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

64 }
65
66 canDragSource(sourceId) {
67 const source = this.registry.getSource(sourceId);
68 invariant(source, 'Expected to find a valid source.');
69
70 if (this.isDragging()) {
71 return false;
72 }
73
74 return source.canDrag(this, sourceId);
75 }
76
77 canDropOnTarget(targetId) {
78 const target = this.registry.getTarget(targetId);

Callers 3

canDragMethod · 0.80
beginDragFunction · 0.80

Calls 3

isDraggingMethod · 0.95
getSourceMethod · 0.80
canDragMethod · 0.45

Tested by

no test coverage detected