This commit is contained in:
Janus C. H. Knudsen 2026-01-15 01:08:49 +01:00
parent d27116c0dd
commit f41bb38a08

View file

@ -1028,6 +1028,13 @@ class ScheduleController {
* Open the schedule drawer (no overlay - user can still interact with table) * Open the schedule drawer (no overlay - user can still interact with table)
*/ */
private openDrawer(): void { private openDrawer(): void {
// Lås tabelbredde før drawer åbner for at undgå "hop"
const table = document.getElementById('scheduleTable');
if (table) {
const rect = table.getBoundingClientRect();
table.style.width = `${rect.width}px`;
}
this.drawer?.classList.add('open'); this.drawer?.classList.add('open');
document.body.classList.add('schedule-drawer-open'); document.body.classList.add('schedule-drawer-open');
} }
@ -1036,6 +1043,12 @@ class ScheduleController {
* Close the schedule drawer * Close the schedule drawer
*/ */
private closeDrawer(): void { private closeDrawer(): void {
// Fjern låst bredde så tabellen kan tilpasse sig igen
const table = document.getElementById('scheduleTable');
if (table) {
table.style.width = '';
}
this.drawer?.classList.remove('open'); this.drawer?.classList.remove('open');
document.body.classList.remove('schedule-drawer-open'); document.body.classList.remove('schedule-drawer-open');
} }