fix(B04): 집중유역 오버레이를 최상단으로
집중점 마커와 유입 외곽선이 세부유역 채움·관 마커 아래에 깔려, 켜도 무엇을 고른 것인지 보이지 않았다. 강도 색칠은 그대로 두고 마커·외곽선만 떼어 맨 마지막에 그린다. - FlowStrengthOverlay.draw(): 계획선 강도 색칠만 - FlowStrengthOverlay.drawTop(): 집중점 마커 + 선택한 지점의 유입 셀 외곽선 - MapViewer 그리기 순서: 배수유역 오버레이 → 계획선 → 강도 색칠 → 세부유역·관 마커 → 집중유역 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user