From 8c475c9ee8328104d8078e4fce8679906c4bb541 Mon Sep 17 00:00:00 2001 From: minsung Date: Wed, 1 Apr 2026 16:20:28 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20RoutePanel=20=EC=8B=9C=EC=A0=90/?= =?UTF-8?q?=EC=A2=85=EC=A0=90=20=ED=91=9C=EC=8B=9C=20=EB=B0=8F=20=EA=B5=90?= =?UTF-8?q?=EB=9F=89/=ED=84=B0=EB=84=90=EB=A7=8C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 상단 시점, 하단 종점 측점명 고정 표시 - POI는 교량/터널만 필터링 (터널: 보라, 교량: 하늘색) - 불필요한 측점 도트/텍스트 제거 Co-Authored-By: Claude Sonnet 4.6 --- client/src/components/overlay/RoutePanel.tsx | 79 ++++++++++++-------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/client/src/components/overlay/RoutePanel.tsx b/client/src/components/overlay/RoutePanel.tsx index e338bd4..d34836d 100644 --- a/client/src/components/overlay/RoutePanel.tsx +++ b/client/src/components/overlay/RoutePanel.tsx @@ -225,6 +225,14 @@ export default function RoutePanel({ currentTime, visible, onSeek }: RoutePanelP const maxKm = Math.max(...allKms); const kmToY = (km: number) => (1 - (km - minKm) / (maxKm - minKm)) * 100; + // 시점/종점 측점 + const sortedByKm = [...validStations].sort((a, b) => stationKm(a.title) - stationKm(b.title)); + const startStation = sortedByKm[0]; + const endStation = sortedByKm[sortedByKm.length - 1]; + + // 교량/터널만 표시 + const filteredPois = pois.filter(p => p.category === '\uD130\uB110' || p.category === '\uAD50\uB7C9'); + return (
{/* Center vertical line */}
- {/* Stations */} - {validStations.map((st, i) => { - const km = stationKm(st.title); - if (km < 0) return null; - return ( -
-
- {st.title} -
-
-
-
-
- ); - })} + {/* 시점 label — top */} +
+
+ {startStation.title} +
+
+
+
+
시점
+
- {/* POIs */} - {pois.map((poi, i) => { + {/* 종점 label — bottom */} +
+
+ {endStation.title} +
+
+
+
+
종점
+
+ + {/* 교량/터널 POIs */} + {filteredPois.map((poi, i) => { const km = poiKm(poi, validStations); if (km < 0) return null; + const y = kmToY(km); + if (y < 5 || y > 95) return null; // 시점/종점 영역과 겹치지 않게 return (
-
- {CATEGORY_EMOJI[poi.category] || '\uD83D\uDCCD'} -
-
-
+
+
{poi.title}