diff --git a/src/managers/AllDayManager.ts b/src/managers/AllDayManager.ts index 0d5d533..a813cb8 100644 --- a/src/managers/AllDayManager.ts +++ b/src/managers/AllDayManager.ts @@ -178,20 +178,20 @@ export class AllDayManager { let maxRows = 0; if (allDayEvents.length > 0) { - // Track which rows are actually used by checking grid positions - const usedRows = new Set(); + // Find the HIGHEST row number in use (not count of unique rows) + let highestRow = 0; (Array.from(allDayEvents) as HTMLElement[]).forEach((event: HTMLElement) => { const gridRow = parseInt(getComputedStyle(event).gridRowStart) || 1; - usedRows.add(gridRow); + highestRow = Math.max(highestRow, gridRow); }); - // Max rows = highest row number in use - maxRows = usedRows.size > 0 ? Math.max(...usedRows) : 0; + // Max rows = highest row number (e.g. if row 3 is used, height = 3 rows) + maxRows = highestRow; - console.log('🔍 AllDayManager: Height calculation', { + console.log('🔍 AllDayManager: Height calculation FIXED', { totalEvents: allDayEvents.length, - usedRows: Array.from(usedRows).sort(), + highestRowFound: highestRow, maxRows }); }