Improves all-day event hover detection

Enhances the all-day event selection by creating transparent, full-height columns for each day, which enables more accurate and reliable hover detection across all-day events.

Now selects all-day events by hovering on the entire column, not just day headers.
This commit is contained in:
Janus Knudsen 2025-09-17 22:08:27 +02:00
parent 3db93a9e89
commit b4af5a9211
3 changed files with 44 additions and 3 deletions

View file

@ -50,11 +50,12 @@ export class HeaderManager {
const target = event.target as HTMLElement;
// Optimized element detection - only handle day headers
// Optimized element detection - handle day headers and all-day columns
const dayHeader = target.closest('swp-day-header');
const allDayColumn = target.closest('swp-allday-column');
if (dayHeader) {
const hoveredElement = dayHeader as HTMLElement;
if (dayHeader || allDayColumn) {
const hoveredElement = (dayHeader || allDayColumn) as HTMLElement;
const targetDate = hoveredElement.dataset.date;
// Get header renderer for coordination