Fix: Mehrtägige Events auf Tagesende begrenzt, Stundenhöhen weiter reduziert

Timed-Events in Wochen-/Tagesansicht werden jetzt auf Mitternacht (24:00) des Starttages gekürzt – keine kilometerhohen Balken mehr bei tagesübergreifenden Terminen. Stundenhöhen: 36/54/72/90 → 28/44/60/80px; Kompakt (28px) zeigt 24h = 672px.
This commit is contained in:
2026-04-08 14:27:24 +02:00
parent dea15191d8
commit d29cbb8450
4 changed files with 11 additions and 9 deletions

View File

@@ -74,7 +74,9 @@ export function renderWeek(container, currentDate, events, onSlotClick, onEventC
const s = new Date(ev.start);
const e = new Date(ev.end);
const top = s.getHours() * hourH + s.getMinutes() * hourH / 60;
const height = Math.max(20, (e - s) / 60000 * hourH / 60);
const dayEnd = new Date(s); dayEnd.setHours(24, 0, 0, 0);
const clampedEnd = e > dayEnd ? dayEnd : e;
const height = Math.max(20, (clampedEnd - s) / 60000 * hourH / 60);
const left = (col / cols) * 100;
const width = (1 / cols) * 100 - 0.5;
const color = ev.color || ev.calendarColor || '#4285f4';