Refactors event positioning and drag-and-drop
Centralizes event position calculations into `PositionUtils` for consistency and reusability across managers and renderers. Improves drag-and-drop functionality by emitting events for all-day event conversion and streamlining position calculations during drag operations. Introduces `AllDayManager` and `AllDayEventRenderer` to manage and render all-day events in the calendar header. This allows dragging events to the header to convert them to all-day events.
This commit is contained in:
parent
8b96376d1f
commit
7054c0d40a
9 changed files with 404 additions and 72 deletions
|
|
@ -7,6 +7,7 @@ import { NavigationManager } from '../managers/NavigationManager';
|
|||
import { ViewManager } from '../managers/ViewManager';
|
||||
import { CalendarManager } from '../managers/CalendarManager';
|
||||
import { DragDropManager } from '../managers/DragDropManager';
|
||||
import { AllDayManager } from '../managers/AllDayManager';
|
||||
|
||||
/**
|
||||
* Factory for creating and managing calendar managers with proper dependency injection
|
||||
|
|
@ -35,6 +36,7 @@ export class ManagerFactory {
|
|||
viewManager: ViewManager;
|
||||
calendarManager: CalendarManager;
|
||||
dragDropManager: DragDropManager;
|
||||
allDayManager: AllDayManager;
|
||||
} {
|
||||
|
||||
// Create managers in dependency order
|
||||
|
|
@ -45,6 +47,7 @@ export class ManagerFactory {
|
|||
const navigationManager = new NavigationManager(eventBus, eventRenderer);
|
||||
const viewManager = new ViewManager(eventBus);
|
||||
const dragDropManager = new DragDropManager(eventBus);
|
||||
const allDayManager = new AllDayManager();
|
||||
|
||||
// CalendarManager depends on all other managers
|
||||
const calendarManager = new CalendarManager(
|
||||
|
|
@ -64,7 +67,8 @@ export class ManagerFactory {
|
|||
navigationManager,
|
||||
viewManager,
|
||||
calendarManager,
|
||||
dragDropManager
|
||||
dragDropManager,
|
||||
allDayManager
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue