feat: RoutePanel/StationOverlay 개선
- 시점/종점: 드론 첫/마지막 프레임 기준 역명 표시 (회덕, 대전조차장 등) - (상)/(하) 접미어 제거 (cleanTitle) - 패널 높이 90%, 글씨 크기 +30%, 투명도 밝게 - 교량/터널 POI 겹침 방지 (7% 간격) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,8 @@ interface RenderCache {
|
||||
poiCount: number;
|
||||
}
|
||||
|
||||
const cleanTitle = (t: string) => t.replace(/\s*\([상하]\)\s*$/, '').trim();
|
||||
|
||||
function stationOrder(title: string): number {
|
||||
const m = title.match(/(\d+)[Kk](\d+)/);
|
||||
if (!m) return 0;
|
||||
@@ -470,10 +472,10 @@ export default function StationOverlay({ currentFrame, currentTime, fps, visible
|
||||
const lx = Math.max(2, x + 8);
|
||||
ctx.strokeStyle = 'rgba(0,0,0,0.85)'; ctx.lineWidth = 4;
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeText(stA.title, lx, y);
|
||||
ctx.strokeText(cleanTitle(stA.title), lx, y);
|
||||
// 텍스트 본문
|
||||
ctx.fillStyle = 'rgba(255,200,200,1.0)';
|
||||
ctx.fillText(stA.title, lx, y);
|
||||
ctx.fillText(cleanTitle(stA.title), lx, y);
|
||||
});
|
||||
|
||||
// POI 마커 — 보간 후 EMA 적용
|
||||
@@ -495,7 +497,7 @@ export default function StationOverlay({ currentFrame, currentTime, fps, visible
|
||||
ctx.stroke();
|
||||
// 이모지 + 텍스트
|
||||
const emoji = CATEGORY_EMOJI[poiA.category] ?? '📌';
|
||||
const label = `${emoji} ${poiA.title}`;
|
||||
const label = `${emoji} ${cleanTitle(poiA.title)}`;
|
||||
const lx = Math.max(2, px + 14);
|
||||
ctx.strokeStyle = 'rgba(0,0,0,0.85)'; ctx.lineWidth = 4;
|
||||
ctx.lineJoin = 'round';
|
||||
|
||||
Reference in New Issue
Block a user