MCPcopy
hub / github.com/adobe/react-spectrum / activate

Method activate

packages/react-aria/src/dnd/DragManager.ts:686–699  ·  view source on GitHub ↗
(dropTarget: DropTarget | null, dropItem: DroppableItem | null | undefined)

Source from the content-addressed store, hash-verified

684 }
685
686 activate(dropTarget: DropTarget | null, dropItem: DroppableItem | null | undefined): void {
687 if (dropTarget && typeof dropTarget.onDropActivate === 'function') {
688 let target = dropItem?.target ?? null;
689 let rect = dropTarget.element.getBoundingClientRect();
690 dropTarget.onDropActivate(
691 {
692 type: 'dropactivate',
693 x: rect.left + rect.width / 2,
694 y: rect.top + rect.height / 2
695 },
696 target
697 );
698 }
699 }
700}
701
702function findValidDropTargets(options: DragTarget) {

Callers 2

onKeyUpMethod · 0.95
onClickMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected