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

Function isFromDragButton

packages/react-aria-components/src/DragAndDrop.tsx:196–197  ·  view source on GitHub ↗
(e: DragEvent<HTMLElement>)

Source from the content-addressed store, hash-verified

194 // preview positioned relative to the item, matching the behavior when dragging from the item.
195 let {draggable, onDragStart, onDrag, onDragEnd} = draggableItem?.dragProps ?? {};
196 let isFromDragButton = (e: DragEvent<HTMLElement>) =>
197 nodeContains(dragButtonRef.current, getEventTarget(e) as Element);
198
199 return {
200 itemProps: {

Callers 1

Calls 2

nodeContainsFunction · 0.90
getEventTargetFunction · 0.90

Tested by

no test coverage detected