기록 시간 슬라이더 표시 정리
This commit is contained in:
+12
-4
@@ -1492,6 +1492,17 @@ function formatDateTime(value) {
|
||||
});
|
||||
}
|
||||
|
||||
function formatTimelineTime(value) {
|
||||
const ts = toTimestamp(value);
|
||||
if (!ts) return '-';
|
||||
return new Date(ts).toLocaleString(langCode === 'ko' ? 'ko-KR' : 'en-US', {
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
}
|
||||
|
||||
function speedColor(kmh) {
|
||||
return speedBucket(kmh).color;
|
||||
}
|
||||
@@ -2001,10 +2012,7 @@ function moveSelectedHistoryPoint(index, pan = false, syncSlider = true) {
|
||||
|
||||
const value = document.getElementById('historyTimelineValue');
|
||||
if (value) {
|
||||
const prev = points[Math.max(0, safeIndex - 1)];
|
||||
const seconds = safeIndex > 0 ? Math.max(1, (toTimestamp(point.time) - toTimestamp(prev.time)) / 1000) : 0;
|
||||
const kmh = safeIndex > 0 ? distanceMeters(prev, point) / seconds * 3.6 : 0;
|
||||
value.textContent = `${formatDateTime(point.time)} · ${speedLabel(kmh)} ${formatSpeed(kmh)}`;
|
||||
value.textContent = formatTimelineTime(point.time);
|
||||
}
|
||||
if (syncSlider) {
|
||||
const slider = document.getElementById('historyTimelineSlider');
|
||||
|
||||
Reference in New Issue
Block a user