(dropTarget: DropTarget | null, dropItem: DroppableItem | null | undefined)
| 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 | |
| 702 | function findValidDropTargets(options: DragTarget) { |