From 0fb656ce49ecaeaf545704854f11d9a55d94e7e9 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 2 Aug 2026 00:25:53 +0900 Subject: [PATCH] =?UTF-8?q?fix(B04):=20=EC=A7=91=EC=A4=91=EC=9C=A0?= =?UTF-8?q?=EC=97=AD=20=EC=98=A4=EB=B2=84=EB=A0=88=EC=9D=B4=EB=A5=BC=20?= =?UTF-8?q?=EC=B5=9C=EC=83=81=EB=8B=A8=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 집중점 마커와 유입 외곽선이 세부유역 채움·관 마커 아래에 깔려, 켜도 무엇을 고른 것인지 보이지 않았다. 강도 색칠은 그대로 두고 마커·외곽선만 떼어 맨 마지막에 그린다. - FlowStrengthOverlay.draw(): 계획선 강도 색칠만 - FlowStrengthOverlay.drawTop(): 집중점 마커 + 선택한 지점의 유입 셀 외곽선 - MapViewer 그리기 순서: 배수유역 오버레이 → 계획선 → 강도 색칠 → 세부유역·관 마커 → 집중유역 Co-Authored-By: Claude Opus 5 (1M context) --- .../B04_wf1_Surface_UI_FlowStrength.ts | 23 +++++++++++++------ .../B04_wf1_Surface_UI_MapViewer.ts | 4 +++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/B04_wf1_Surface/B04_wf1_Surface_UI_FlowStrength.ts b/B04_wf1_Surface/B04_wf1_Surface_UI_FlowStrength.ts index 1cc2b026..f696cf10 100644 --- a/B04_wf1_Surface/B04_wf1_Surface_UI_FlowStrength.ts +++ b/B04_wf1_Surface/B04_wf1_Surface_UI_FlowStrength.ts @@ -62,7 +62,15 @@ export interface FlowStrengthOverlay { clear: () => void; /** 마커를 눌렀으면 true. 누른 것이 없으면 선택을 풀고 false. */ handleClick: (normalizer: Normalizer | null, view: ViewState, x: number, y: number) => boolean; + /** 계획선 위 강도 색칠. 다른 오버레이 아래에 깔린다. */ draw: (context: CanvasRenderingContext2D, normalizer: Normalizer | null, view: ViewState) => void; + /** 유입 집중점 마커와 그 유입 외곽선. **맨 마지막에** 부른다 — 세부유역 채움·관 마커에 + * 가리면 무엇을 고른 것인지 알 수 없다(2026-08-02 사용자 지시). */ + drawTop: ( + context: CanvasRenderingContext2D, + normalizer: Normalizer | null, + view: ViewState, + ) => void; dispose: () => void; } @@ -317,13 +325,14 @@ export function createFlowStrengthOverlay(onChange: () => void): FlowStrengthOve void loadSelection(hit); return true; }, - draw(context, normalizer, view) { - if (shown && meta) { - const mapMeta = meta; - drawStrengthLine(context, samples, strength, maxStrength, (point) => - metricToScreen(mapMeta, view, point.x, point.y), - ); - } + draw(context, _normalizer, view) { + if (!shown || !meta) return; + const mapMeta = meta; + drawStrengthLine(context, samples, strength, maxStrength, (point) => + metricToScreen(mapMeta, view, point.x, point.y), + ); + }, + drawTop(context, normalizer, view) { // 집중점 마커와 그 유입 외곽선은 전용 토글이 켜졌을 때만 그린다. if (!markersShown) return; drawSelection(context, normalizer, view); diff --git a/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts b/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts index 0382c90f..33be8896 100644 --- a/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts +++ b/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts @@ -418,8 +418,10 @@ export function createSurfaceMapViewer(): SurfaceMapViewer { } // 흐름 강도(도로 색·유입 집중점 마커)는 계획선 위에 얹는다. flowStrength.draw(context, normalizer, view); - // 세부유역 채움과 관 마커는 맨 위 — 편집 대상이라 다른 레이어에 가려지면 집을 수 없다. + // 세부유역 채움과 관 마커는 그 위 — 편집 대상이라 다른 레이어에 가려지면 집을 수 없다. detailBasins.draw(context, normalizer, view); + // 유입 집중점(집중유역)은 맨 마지막 — 켰을 때 무엇에도 가리지 않아야 고를 수 있다. + flowStrength.drawTop(context, normalizer, view); updateImageTransform(); drawScaleBar(mapRect); }