Refactors event system to use CoreEvents

Migrates the application to use a new CoreEvents system.

This change removes the legacy EventTypes constant file and updates all managers, renderers, and core components to use the CoreEvents constant file for event emission and subscription.

This improves code maintainability and promotes a consistent eventing strategy across the application. Adds validation to EventBus emit and extractCategory functions.
This commit is contained in:
Janus Knudsen 2025-08-20 20:22:51 +02:00
parent 414ef1caaf
commit 4b4dbdc0d6
11 changed files with 76 additions and 228 deletions

View file

@ -2,7 +2,7 @@
import { eventBus } from '../core/EventBus';
import { calendarConfig } from '../core/CalendarConfig';
import { EventTypes } from '../constants/EventTypes';
import { CoreEvents } from '../constants/CoreEvents';
/**
* Manages scrolling functionality for the calendar using native scrollbars
@ -31,7 +31,7 @@ export class ScrollManager {
private subscribeToEvents(): void {
// Handle navigation animation completion - sync time axis position
eventBus.on(EventTypes.NAVIGATION_ANIMATION_COMPLETE, () => {
eventBus.on(CoreEvents.NAVIGATION_ANIMATION_COMPLETE, () => {
this.syncTimeAxisPosition();
this.setupScrolling();
});