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

Method getSource

packages/dnd-core/src/HandlerRegistry.js:102–109  ·  view source on GitHub ↗
(sourceId, includePinned)

Source from the content-addressed store, hash-verified

100 }
101
102 getSource(sourceId, includePinned) {
103 invariant(this.isSourceId(sourceId), 'Expected a valid source ID.');
104
105 const isPinned = includePinned && sourceId === this.pinnedSourceId;
106 const source = isPinned ? this.pinnedSource : this.handlers[sourceId];
107
108 return source;
109 }
110
111 getTarget(targetId) {
112 invariant(this.isTargetId(targetId), 'Expected a valid target ID.');

Callers 7

removeSourceMethod · 0.95
pinSourceMethod · 0.95
canDragSourceMethod · 0.80
isDraggingSourceMethod · 0.80
beginDragFunction · 0.80
endDragFunction · 0.80

Calls 1

isSourceIdMethod · 0.95

Tested by

no test coverage detected