Adds scroll synchronization for calendar view

Introduces ScrollManager to synchronize time axis and header scrolling

Improves user experience by keeping time axis and header aligned during scrolling
Enables dynamic vertical and horizontal scroll tracking for calendar components
This commit is contained in:
Janus C. H. Knudsen 2025-12-07 15:08:23 +01:00
parent ed5b2beb4c
commit 70e505526f
4 changed files with 65 additions and 9 deletions

View file

@ -2,6 +2,7 @@ import { CalendarOrchestrator } from '../core/CalendarOrchestrator';
import { TimeAxisRenderer } from '../features/timeaxis/TimeAxisRenderer';
import { NavigationAnimator } from '../core/NavigationAnimator';
import { DateService } from '../core/DateService';
import { ScrollManager } from '../core/ScrollManager';
import { ViewConfig } from '../core/ViewConfig';
export class DemoApp {
@ -13,7 +14,8 @@ export class DemoApp {
constructor(
private orchestrator: CalendarOrchestrator,
private timeAxisRenderer: TimeAxisRenderer,
private dateService: DateService
private dateService: DateService,
private scrollManager: ScrollManager
) {}
init(): void {
@ -49,6 +51,9 @@ export class DemoApp {
// Render time axis
this.timeAxisRenderer.render(document.getElementById('time-axis') as HTMLElement);
// Init scroll synkronisering
this.scrollManager.init(this.container);
// Setup event handlers
this.setupNavigation();
this.setupViewSwitchers();