From c915bbd1a743ca3b6f1b9d85c1f4de3573f53682 Mon Sep 17 00:00:00 2001 From: dgfh0450 Date: Fri, 7 Feb 2025 16:35:51 +0900 Subject: [PATCH] =?UTF-8?q?[UNI-149]=20fix=20:=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=82=BD=EC=9E=85=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0=20(1,=202,=203,=204,=205,=205,?= =?UTF-8?q?=206,=207,=208)=20=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uniro_frontend/src/pages/reportRoute.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/uniro_frontend/src/pages/reportRoute.tsx b/uniro_frontend/src/pages/reportRoute.tsx index 55b55aa..bd1fed0 100644 --- a/uniro_frontend/src/pages/reportRoute.tsx +++ b/uniro_frontend/src/pages/reportRoute.tsx @@ -202,13 +202,16 @@ export default function ReportRoutePage() { const subNodes = []; const edges = newPoints.coords.map((node, idx) => [node, newPoints.coords[idx + 1]]).slice(0, -1); + const lastPoint = newPoints.coords[newPoints.coords.length - 1] as Node | Coord; + for (const edge of edges) { - const subNode = createSubNodes(new Polyline({ path: edge })); + const subNode = createSubNodes(new Polyline({ path: edge })).slice(0, -1); subNodes.push(...subNode); } + subNodes.push(lastPoint); + if (!originPoint.current) return; - const lastPoint = newPoints.coords[newPoints.coords.length - 1] as Node | Coord; if ("nodeId" in lastPoint) { mutate({