fix(D03 긋기): 놓인 노드 +/− 색 보이게 — 선보다 굵은 부호 색 점 + 검은 테 · 고른 선은 노랑 강조 위에 점 다시 · 손잡이 = 빈 네모 (PLAN 625-3 · 요구 535-2)
까닭 — 놓인 점 반지름 3 px · 테 없음 = − 하늘(#29e0ff)이 노선 민트 선(#3df5c4)에 묻힘 · 고른 선은 흰 네모 손잡이와 노랑 강조(8 px)가 점을 덮음. - DrawPaint `paintNodes` 떼어 냄(점 5 px · fillCased) · Edit 가 고른 선만 강조 위에 다시 그림(heightAt 인자 덧) - 시험 test_625_draw 놓인 노드 지킴 하나 덧 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
import { showToast } from "@ui/ui_template_elements";
|
||||
import { themeColor } from "@ui/ui_template_palette";
|
||||
import { keyIs } from "../A00_Common/key_registry";
|
||||
import { distanceAlong, pointAtDistance } from "./logic/D03_PlanAnalysis_Draw";
|
||||
import { distanceAlong, pointAtDistance, type HeightAt } from "./logic/D03_PlanAnalysis_Draw";
|
||||
import {
|
||||
insertVertex,
|
||||
moveMark,
|
||||
@@ -46,7 +46,9 @@ import {
|
||||
} from "./logic/D03_PlanAnalysis_Select";
|
||||
import {
|
||||
lineAt,
|
||||
NODE_DOT_PX,
|
||||
paintMark,
|
||||
paintNodes,
|
||||
planLabel,
|
||||
screenGap,
|
||||
SNAP_PX,
|
||||
@@ -70,6 +72,8 @@ export interface PlanEditParams {
|
||||
/** 지점(긋기에 붙는 점 · 591-2). */
|
||||
base: () => Vertex[];
|
||||
commit: (next: PlanNetwork) => void;
|
||||
/** 원지반 높이(고른 선 꺾임점 부호 색 · 625-3). */
|
||||
heightAt: () => HeightAt;
|
||||
/** 끌기 중 — 화면만 바꿈(되돌리기 · 캐시 없음). */
|
||||
show: (next: PlanNetwork) => void;
|
||||
/** 지점 자리 노드를 끎 — 지점 · 노선 한 걸음 · 화면만. */
|
||||
@@ -329,18 +333,18 @@ export function createPlanEdit(params: PlanEditParams): PlanEdit {
|
||||
context.stroke();
|
||||
strokeCased(context, colors.active, PICK_LINE_PX);
|
||||
}
|
||||
// 꺾임점 손잡이(고른 것이 든 선)
|
||||
// 꺾임점 손잡이(고른 것이 든 선) = 부호 색 점(고름 강조 위에 다시) + 감싸는 빈 네모(625-3)
|
||||
const lines = pickedLines(network);
|
||||
context.lineWidth = 2;
|
||||
context.fillStyle = "#ffffff";
|
||||
for (const line of network.lines) {
|
||||
if (!lines.has(line.id)) continue;
|
||||
const handled = network.lines.filter((line) => lines.has(line.id));
|
||||
paintNodes(context, map, handled, params.heightAt());
|
||||
const half = NODE_DOT_PX + 3;
|
||||
for (const line of handled)
|
||||
for (const point of line.vertices) {
|
||||
const [sx, sy] = map.toScreen(point);
|
||||
context.fillRect(sx - 4, sy - 4, 8, 8);
|
||||
context.strokeRect(sx - 4, sy - 4, 8, 8);
|
||||
context.beginPath();
|
||||
context.rect(sx - half, sy - half, half * 2, half * 2);
|
||||
strokeCased(context, colors.active, 2);
|
||||
}
|
||||
}
|
||||
// 고른 노드 · 마크 테
|
||||
const node = picked?.kind === "node" ? picked.node : null;
|
||||
const nodePoint = node
|
||||
|
||||
Reference in New Issue
Block a user