Fix detail view timeline

This commit is contained in:
Kiyomichi Kosaka 2025-06-20 08:02:40 +02:00
parent b2d8754c7e
commit ead5d58d21
2 changed files with 24 additions and 0 deletions

View File

@ -701,6 +701,16 @@ function showEonstripDetail(index, startCob) {
timeline.appendChild(block);
}
let markerCob = manualMode ? manualCobiets : toCobiets(new Date());
const rel = (markerCob - startCob) / COBIE_UNITS.eonstrip;
if (rel >= 0 && rel <= 1) {
const line = document.createElement('div');
line.className = 'current-time-line';
line.style.top = (rel * 100) + '%';
line.textContent = formatCobieTimestamp(markerCob);
timeline.appendChild(line);
}
if (Array.isArray(window.SPECIAL_EVENTS)) {
const events = [];
const start = startCob;

View File

@ -415,6 +415,20 @@
color: #aaa;
font-size: 0.8em;
padding-top: 2px;
pointer-events: none;
z-index: 1;
}
.current-time-line {
position: absolute;
left: -40px;
width: calc(100% + 40px);
border-top: 2px solid #ff00ff;
color: #ff00ff;
font-size: 0.8em;
padding-top: 2px;
pointer-events: none;
z-index: 2;
}
.event-box, .event-line {