MCPcopy Create free account
hub / github.com/adobe/react-spectrum / fireDropEnter

Function fireDropEnter

packages/react-aria/src/dnd/useDrop.ts:123–134  ·  view source on GitHub ↗
(e: DragEvent)

Source from the content-addressed store, hash-verified

121 }).current;
122
123 let fireDropEnter = (e: DragEvent) => {
124 setDropTarget(true);
125
126 if (typeof options.onDropEnter === 'function') {
127 let rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
128 options.onDropEnter({
129 type: 'dropenter',
130 x: e.clientX - rect.x,
131 y: e.clientY - rect.y
132 });
133 }
134 };
135
136 let fireDropExit = (e: DragEvent) => {
137 setDropTarget(false);

Callers 2

onDragOverFunction · 0.85
onDragEnterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected