From 79841c3f94ff2e50f51c38907ba2923735611af5 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 16 Oct 2022 18:30:55 -0700 Subject: Add route points --- modern/src/other/ReplayPage.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'modern/src/other/ReplayPage.js') diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js index 9d8503a8..ee9e15d9 100644 --- a/modern/src/other/ReplayPage.js +++ b/modern/src/other/ReplayPage.js @@ -16,6 +16,7 @@ import { useNavigate } from 'react-router-dom'; import { useSelector } from 'react-redux'; import MapView from '../map/core/MapView'; import MapRoutePath from '../map/MapRoutePath'; +import MapRoutePoints from '../map/MapRoutePoints'; import MapPositions from '../map/MapPositions'; import { formatTime } from '../common/util/formatter'; import ReportFilter from '../reports/components/ReportFilter'; @@ -132,7 +133,11 @@ const ReplayPage = () => { } }, [index, positions]); - const onMapClick = useCallback((positionId) => { + const onPointClick = useCallback((_, index) => { + setIndex(index); + }, [setIndex]); + + const onMarkerClick = useCallback((positionId) => { setShowCard(!!positionId); }, [setShowCard]); @@ -166,11 +171,9 @@ const ReplayPage = () => { + {index < positions.length && ( - + )} -- cgit v1.2.3