Allows dynamic drag clone replacement
Introduces a polymorphic `createClone` method on base event elements to customize clone generation. Adds a `replaceClone` delegate to drag event payloads, enabling subscribers to dynamically swap the active dragged clone. This supports scenarios like converting a standard event clone to an all-day event clone when dragging to the all-day header.
This commit is contained in:
parent
125cd678a3
commit
5fae433afb
5 changed files with 641 additions and 31 deletions
|
|
@ -84,6 +84,8 @@ export interface DragMouseEnterHeaderEventPayload {
|
|||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement;
|
||||
calendarEvent: CalendarEvent;
|
||||
// Delegate pattern - allows subscriber to replace the dragged clone
|
||||
replaceClone: (newClone: HTMLElement) => void;
|
||||
}
|
||||
|
||||
// Drag mouse leave header event payload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue