Fix detail view timeline
This commit is contained in:
parent
b2d8754c7e
commit
ead5d58d21
10
script.js
10
script.js
@ -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;
|
||||
|
||||
14
style.css
14
style.css
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user