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

Method canDrop

packages/react-dnd/src/createTargetMonitor.js:14–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 }
13
14 canDrop() {
15 invariant(
16 !isCallingCanDrop,
17 'You may not call monitor.canDrop() inside your canDrop() implementation. ' +
18 'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html',
19 );
20
21 try {
22 isCallingCanDrop = true;
23 return this.internalMonitor.canDropOnTarget(this.targetId);
24 } finally {
25 isCallingCanDrop = false;
26 }
27 }
28
29 isOver(options) {
30 return this.internalMonitor.isOverTarget(this.targetId, options);

Callers

nothing calls this directly

Calls 1

canDropOnTargetMethod · 0.80

Tested by

no test coverage detected