A step in the right direction for this time axis

This commit is contained in:
Janus Knudsen 2025-08-01 23:45:13 +02:00
parent b6d3d22ce9
commit 209ae0830d
4 changed files with 33 additions and 11 deletions

View file

@ -166,6 +166,7 @@ export class GridManager {
if (!this.grid) return;
const timeAxis = document.createElement('swp-time-axis');
const timeAxisContent = document.createElement('swp-time-axis-content');
const startHour = calendarConfig.get('dayStartHour');
const endHour = calendarConfig.get('dayEndHour');
@ -174,9 +175,10 @@ export class GridManager {
const period = hour >= 12 ? 'PM' : 'AM';
const displayHour = hour > 12 ? hour - 12 : (hour === 0 ? 12 : hour);
marker.textContent = `${displayHour} ${period}`;
timeAxis.appendChild(marker);
timeAxisContent.appendChild(marker);
}
timeAxis.appendChild(timeAxisContent);
this.grid.appendChild(timeAxis);
}