From a68eced66c55716d432501db20e8578736c66c95 Mon Sep 17 00:00:00 2001 From: ben_29 Date: Sun, 10 Dec 2023 16:37:11 +0800 Subject: [PATCH] style: disable dash and transparent, stronger line when lights off --- src/components/RunMap/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/RunMap/index.tsx b/src/components/RunMap/index.tsx index a2502dbbc91..ebb5280ac6a 100644 --- a/src/components/RunMap/index.tsx +++ b/src/components/RunMap/index.tsx @@ -106,7 +106,7 @@ const RunMap = ({ [startLon, startLat] = points[0]; [endLon, endLat] = points[points.length - 1]; } - let dash = USE_DASH_LINE && !isSingleRun ? [2, 2] : [2, 0]; + let dash = USE_DASH_LINE && !isSingleRun && !isBigMap ? [2, 2] : [2, 0]; const onMove = React.useCallback(({ viewState }: {viewState: IViewState}) => { setViewState(viewState); }, []); @@ -145,9 +145,9 @@ const RunMap = ({ type="line" paint={{ 'line-color': MAIN_COLOR, - 'line-width': isBigMap ? 1 : 2, + 'line-width': isBigMap && lights ? 1 : 2, 'line-dasharray': dash, - 'line-opacity': isSingleRun ? 1 : LINE_OPACITY, + 'line-opacity': isSingleRun || isBigMap || !lights ? 1 : LINE_OPACITY, 'line-blur': 1, }} layout={{