Improves all-day event rendering and placement
Simplifies and improves the all-day event rendering process, ensuring consistent container creation and proper placement of events. - Ensures all-day containers are consistently created during header rendering, preventing potential issues with event placement. - Removes the complex and unreliable mouseover detection for all-day conversion, simplifying the event dragging logic. - Eliminates the dynamic all-day row height calculation, relying on CSS for layout control. - Prevents errors when the all-day container is missing.
This commit is contained in:
parent
fafad16926
commit
ae42de1f3b
4 changed files with 15 additions and 105 deletions
|
|
@ -39,10 +39,10 @@ export abstract class BaseHeaderRenderer implements HeaderRenderer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Ensure all-day containers exist - but don't create them initially, use lazy creation
|
||||
* Ensure all-day containers exist - always create them during header rendering
|
||||
*/
|
||||
ensureAllDayContainers(calendarHeader: HTMLElement): void {
|
||||
// Do nothing initially - containers will be created when first needed
|
||||
this.createAllDayMainStructure(calendarHeader);
|
||||
}
|
||||
|
||||
private animateHeaderExpansion(calendarHeader: HTMLElement): void {
|
||||
|
|
@ -163,6 +163,9 @@ export class DateHeaderRenderer extends BaseHeaderRenderer {
|
|||
|
||||
calendarHeader.appendChild(header);
|
||||
});
|
||||
|
||||
// Always create all-day container after rendering headers
|
||||
this.ensureAllDayContainers(calendarHeader);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -192,5 +195,7 @@ export class ResourceHeaderRenderer extends BaseHeaderRenderer {
|
|||
calendarHeader.appendChild(header);
|
||||
});
|
||||
|
||||
// Always create all-day container after rendering headers
|
||||
this.ensureAllDayContainers(calendarHeader);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue