fix(b06): 안 골라진 카드 보라 사면선 첫 누름 = 그 선 — 남은 부재 고름(도수로 띠)을 먼저 풀어 카드 고름이 되살리지 않음 (295-4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
This commit is contained in:
@@ -321,7 +321,11 @@ export function createCrossSectionCard(
|
||||
setChipActive(null);
|
||||
onAreaSelect?.(section.station_id, null);
|
||||
}
|
||||
if (!isSelected) onSelect(section.station_id);
|
||||
if (!isSelected) {
|
||||
// 첫 누름 = 이 선 — 남은 부재 고름(도수로 띠 등)이 카드 고름에 되살아나 선을 풀지 않게(295-4)
|
||||
if (activeRevet === null) revetOffset?.select(section.chainage_m, null);
|
||||
onSelect(section.station_id);
|
||||
}
|
||||
}
|
||||
setLineActive(next);
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ def test_카드_배선_하나만() -> None:
|
||||
"""137-3 — 선을 고르면 벽 · 본체 · 면적을 풀고 카드도 고름 · 다른 고름은 선을 풂."""
|
||||
view = _src("B06_Section/B06_Section_UI_Cross_View.ts")
|
||||
assert "const pickLine = (index: number): void => {" in view
|
||||
assert "if (!isSelected) onSelect(section.station_id);" in view
|
||||
assert "if (activeRevet === null) revetOffset?.select(section.chainage_m, null);" in view
|
||||
assert view.count("dropLine();") >= 4 # 본체 · 벽 · 카드 풂 · 면적
|
||||
assert "setLineActive(pickedLineAt(section.station_id));" in view # 다시 그려도 되살림
|
||||
assert "zoomBar.prepend(linePick.label);" in view # 치수 = [+ − ⤢] 왼쪽
|
||||
|
||||
@@ -116,3 +116,24 @@ def test_배선():
|
||||
assert "detailHomeView(layerPoints(layer), [cx, cy], plot, homeScale, 16)" in detail
|
||||
for name in ("B06_Section_UI_Cross_View.ts", "B06_Section_UI_Cross_Detail_Select.ts"):
|
||||
assert len(_read(name).splitlines()) <= 700
|
||||
|
||||
|
||||
def test_보라_선_첫_누름은_그_선_295_4():
|
||||
"""안 골라진 카드의 성토 사면선 첫 누름 — 남은 부재키(도수로 띠)를 먼저 풀어 카드 고름이 되살리지 않음."""
|
||||
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
|
||||
["node", os.path.join(HERE, "helper_294_7_ford_slab_pick.cjs")],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
timeout=60,
|
||||
)
|
||||
assert proc.returncode == 0, proc.stderr
|
||||
first = json.loads(proc.stdout)["firstLine"]
|
||||
assert first["oldKey"] == "chute" # 옛 길 = 카드 고름이 도수로 띠 부재키를 지킴 → 선 풀림
|
||||
assert first["newKey"] is None
|
||||
view = " ".join(_read("B06_Section_UI_Cross_View.ts").split())
|
||||
assert "if (!isSelected) { // 첫 누름 = 이 선" in view
|
||||
assert (
|
||||
"if (activeRevet === null) revetOffset?.select(section.chainage_m, null); onSelect(section.station_id);"
|
||||
in view
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user