Refactors all-day event rendering and DOM access
Decouples all-day event rendering, making it reactive to header readiness with period data. Eliminates explicit DOM element caching, simplifying element access. Enhances the `header:ready` event payload with `startDate` and `endDate`. Improves all-day row height animation and calculation.
This commit is contained in:
parent
f5e9909935
commit
6498b0ba8e
6 changed files with 98 additions and 116 deletions
|
|
@ -16,25 +16,19 @@ export class AllDayEventRenderer {
|
|||
* Get or cache all-day container, create if it doesn't exist - SIMPLIFIED (no ghost columns)
|
||||
*/
|
||||
private getContainer(): HTMLElement | null {
|
||||
if (!this.container) {
|
||||
|
||||
const header = document.querySelector('swp-calendar-header');
|
||||
if (header) {
|
||||
// Try to find existing container
|
||||
this.container = header.querySelector('swp-allday-container');
|
||||
|
||||
// If not found, create it
|
||||
if (!this.container) {
|
||||
this.container = document.createElement('swp-allday-container');
|
||||
header.appendChild(this.container);
|
||||
|
||||
console.log('🏗️ AllDayEventRenderer: Created all-day container (NO ghost columns)');
|
||||
|
||||
// NO MORE GHOST COLUMNS! 🎉
|
||||
// Mouse detection handled by HeaderManager coordinate calculation
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.container;
|
||||
return this.container;
|
||||
|
||||
}
|
||||
|
||||
// REMOVED: createGhostColumns() method - no longer needed!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue