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

Method activate

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

Source from the content-addressed store, hash-verified

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

Callers 2

onKeyUpMethod · 0.95
onClickMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected