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