Refactors event handling and grid rendering
Improves calendar performance and data flow by streamlining event emissions and grid rendering logic. - Replaces generic CONFIG_UPDATE events with REFRESH_REQUESTED for more specific refresh triggers. - Removes redundant grid re-renders on DATE_CHANGED and WEEK_CHANGED events, delegating navigation to NavigationManager. - Introduces VIEW_CHANGED and DATE_CHANGED events for calendar mode and date selection, respectively. - NavigationManager now handles date validation. - Moves rendering logic from NavigationManager to NavigationRenderer. - Syncs scroll position based on PERIOD_CHANGED instead of NAVIGATION_ANIMATION_COMPLETE. This change optimizes the calendar's responsiveness and reduces unnecessary re-renders, leading to a smoother user experience.
This commit is contained in:
parent
4b4dbdc0d6
commit
83c0ce801c
9 changed files with 59 additions and 47 deletions
|
|
@ -31,7 +31,7 @@ export class ScrollManager {
|
|||
|
||||
private subscribeToEvents(): void {
|
||||
// Handle navigation animation completion - sync time axis position
|
||||
eventBus.on(CoreEvents.NAVIGATION_ANIMATION_COMPLETE, () => {
|
||||
eventBus.on(CoreEvents.PERIOD_CHANGED, () => {
|
||||
this.syncTimeAxisPosition();
|
||||
this.setupScrolling();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue