Refactors event rendering to be event-driven
Moves event rendering logic into a dedicated EventRenderer class that uses a strategy pattern for different calendar types. The rendering is now triggered by `GRID_RENDERED` and `CONTAINER_READY_FOR_EVENTS` events, emitted by the GridManager and NavigationManager respectively. This change decouples the CalendarManager from direct event rendering and allows for more flexible and efficient event updates. The EventManager now has a method to fetch events for a given time period. Removes direct calls to event rendering from CalendarManager. Improves animation transitions by using pre-rendered containers in the NavigationManager.
This commit is contained in:
parent
afe5b6b899
commit
a03f314c4a
9 changed files with 271 additions and 166 deletions
|
|
@ -36,10 +36,10 @@ async function initializeCalendar(): Promise<void> {
|
|||
// Create all managers
|
||||
console.log('📋 Creating managers...');
|
||||
calendarManager = new CalendarManager(eventBus, config);
|
||||
navigationManager = new NavigationManager(eventBus);
|
||||
navigationManager = new NavigationManager(eventBus); // No EventRenderer dependency
|
||||
viewManager = new ViewManager(eventBus);
|
||||
eventManager = new EventManager(eventBus);
|
||||
eventRenderer = new EventRenderer(eventBus);
|
||||
eventRenderer = new EventRenderer(eventBus, eventManager); // Pass EventManager
|
||||
gridManager = new GridManager();
|
||||
scrollManager = new ScrollManager();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue