Separates all-day event rendering; handles header lifecycle
Event rendering strategies now exclusively handle timed events, while all-day events are managed by a dedicated renderer. Centralizes calendar header creation within `GridRenderer`, ensuring the header element is always present from initial DOM construction. `HeaderManager` and `ScrollManager` now react to a `header:ready` event, which signifies the header is fully initialized. Synchronizes all-day event rendering with header readiness, temporarily queuing events until the header is prepared. Emits an `allday:checkHeight` event to prompt all-day container height adjustments after rendering.
This commit is contained in:
parent
996459f226
commit
f5e9909935
6 changed files with 128 additions and 18 deletions
|
|
@ -42,8 +42,8 @@ export class ScrollManager {
|
|||
this.updateScrollableHeight();
|
||||
});
|
||||
|
||||
// Handle header rebuild - refresh header reference and re-sync
|
||||
eventBus.on('header:rebuilt', () => {
|
||||
// Handle header ready - refresh header reference and re-sync
|
||||
eventBus.on('header:ready', () => {
|
||||
this.calendarHeader = document.querySelector('swp-calendar-header');
|
||||
if (this.scrollableContent && this.calendarHeader) {
|
||||
this.setupHorizontalScrollSynchronization();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue