Adds handling of fit to width bool

This commit is contained in:
Janus Knudsen 2025-08-05 21:56:06 +02:00
parent 58f98468a1
commit e6d6599a1e
5 changed files with 32 additions and 2 deletions

View file

@ -37,6 +37,7 @@ export class CalendarConfig {
hourHeight: 60, // Pixels per hour
showCurrentTime: true,
showWorkHours: true,
fitToWidth: false, // Fit columns to calendar width (no horizontal scroll)
// Interaction settings
allowDrag: true,
@ -81,6 +82,7 @@ export class CalendarConfig {
if (attrs.dayStartHour) this.config.dayStartHour = parseInt(attrs.dayStartHour);
if (attrs.dayEndHour) this.config.dayEndHour = parseInt(attrs.dayEndHour);
if (attrs.hourHeight) this.config.hourHeight = parseInt(attrs.hourHeight);
if (attrs.fitToWidth !== undefined) this.config.fitToWidth = attrs.fitToWidth === 'true';
}
/**