feat: add story markers to trip map (white diamond); extend flash highlight to story cards

This commit is contained in:
2026-06-20 17:53:56 +00:00
parent d923f3eb46
commit ffcf156289
3 changed files with 25 additions and 5 deletions
+19 -1
View File
@@ -135,6 +135,23 @@
return el;
}
/*
* Return a styled <div> element for a story marker (white diamond, teal border).
*/
function createStoryMarker() {
var el = document.createElement('div');
el.style.cssText = [
'width:10px',
'height:10px',
'background:#fff',
'border:2px solid ' + ACCENT,
'transform:rotate(45deg)',
'box-shadow:0 1px 4px rgba(0,0,0,0.4)',
'cursor:pointer'
].join(';');
return el;
}
/* ── GPX connector algorithm ────────────────────────────────────────── */
/* Haversine distance in km between two [lat, lng] points */
@@ -273,6 +290,7 @@
addJourneySegments: addJourneySegments,
buildJourneySegments: buildJourneySegments,
extractTrackpoints: extractTrackpoints,
createDotMarker: createDotMarker
createDotMarker: createDotMarker,
createStoryMarker: createStoryMarker
};
})(window);