From 6944a9e3421e7e5eaeb2c77a2fe68a5646d364b6 Mon Sep 17 00:00:00 2001 From: Nan Kyung Lee Date: Mon, 16 Mar 2026 08:34:29 +0900 Subject: [PATCH] =?UTF-8?q?feat(prediction):=20=EC=9B=90=20=EB=B6=84?= =?UTF-8?q?=EC=84=9D=20=EA=B8=B0=EB=8A=A5=20=E2=80=94=20=EC=A4=91=EC=8B=AC?= =?UTF-8?q?=EC=A0=90/=EB=B0=98=EA=B2=BD=20=EC=9E=85=EB=A0=A5=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9B=90=ED=98=95=20=EC=98=A4=EC=97=BC=20=EB=A9=B4?= =?UTF-8?q?=EC=A0=81=20=EA=B3=84=EC=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 원 분석 버튼 클릭 시 입력 폼 토글 (중심 위도, 경도, 반경 km) - 사고 지점 좌표를 기본값으로 자동 설정 - πr² 면적, 2πr 둘레 계산 결과 표시 - 결과: 오염 면적(km²), 원 둘레(km), 반경(km), 중심 좌표 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../tabs/prediction/components/RightPanel.tsx | 112 +++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/frontend/src/tabs/prediction/components/RightPanel.tsx b/frontend/src/tabs/prediction/components/RightPanel.tsx index 6a7094c..55d6a37 100755 --- a/frontend/src/tabs/prediction/components/RightPanel.tsx +++ b/frontend/src/tabs/prediction/components/RightPanel.tsx @@ -18,6 +18,11 @@ export function RightPanel({ onOpenBacktrack, onOpenRecalc, onOpenReport, detail const [shipExpanded, setShipExpanded] = useState(false) const [insuranceExpanded, setInsuranceExpanded] = useState(false) const [polygonResult, setPolygonResult] = useState<{ areaKm2: number; perimeterKm: number; particleCount: number; hullPoints: number } | null>(null) + const [showCircleInput, setShowCircleInput] = useState(false) + const [circleCenterLat, setCircleCenterLat] = useState('') + const [circleCenterLon, setCircleCenterLon] = useState('') + const [circleRadiusKm, setCircleRadiusKm] = useState('') + const [circleResult, setCircleResult] = useState<{ areaKm2: number; circumferenceKm: number; centerLat: number; centerLon: number; radiusKm: number } | null>(null) return (
@@ -60,12 +65,115 @@ export function RightPanel({ onOpenBacktrack, onOpenRecalc, onOpenReport, detail 📐 다각형 분석
+ + {/* 원 분석 입력 폼 */} + {showCircleInput && ( +
+
⭕ 원 분석 — 중심점 · 반경 입력
+
+
+ + setCircleCenterLat(e.target.value)} + placeholder="예: 34.7312" + className="w-full px-2 py-1.5 bg-bg-3 border border-border rounded text-[10px] font-mono text-text-1 outline-none focus:border-[var(--cyan)] transition-colors" + /> +
+
+ + setCircleCenterLon(e.target.value)} + placeholder="예: 127.6845" + className="w-full px-2 py-1.5 bg-bg-3 border border-border rounded text-[10px] font-mono text-text-1 outline-none focus:border-[var(--cyan)] transition-colors" + /> +
+
+
+ + setCircleRadiusKm(e.target.value)} + placeholder="예: 3.0" + className="w-full px-2 py-1.5 bg-bg-3 border border-border rounded text-[10px] font-mono text-text-1 outline-none focus:border-[var(--cyan)] transition-colors" + /> +
+ +
+ )} + + {/* 원 분석 결과 */} + {circleResult && ( +
+
⭕ 원 분석 결과
+
+
+
{circleResult.areaKm2.toFixed(2)}
+
오염 면적 (km²)
+
+
+
{circleResult.circumferenceKm.toFixed(1)}
+
원 둘레 (km)
+
+
+
{circleResult.radiusKm.toFixed(1)}
+
반경 (km)
+
+
+
{circleResult.centerLat.toFixed(4)}°N
+
{circleResult.centerLon.toFixed(4)}°E
+
중심 좌표
+
+
+
+ )} + {polygonResult && (
📐 Convex Hull 다각형 분석 결과