feat(800-2): 수식 영역 / 변수 정의 영역 화면 · 식 바로 고침 · 새 기호 연결 지정(800-3)
- 수식 영역 줄 번호 · 구분선 · 줄마다 풀이 걷음 · 오른쪽 변수 정의 영역 부품 ui_template_equation_defs - 식 칸을 눌러 그 자리 고침(줄 선택 · 아이콘 줄 걷음) · 틀린 식 그 자리 빨강 + 까닭 · 미리 셈 - 새 기호 = 정의 영역 맨 위 줄에서 연결(입력 · 표 · 요소 · 로직 · 상수) · 이름 · 기호 · 첨자 고침 · 지움(쓰는 변수 막음) - 낡은 시험 test_796_2_equation_screen 두 건: 아이콘 줄 · 줄 선택 고침 → 바로 고침 꼴로 바꿈(동작 걷음) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,8 @@ def _link(node: dict, spec: dict | None, leaf: dict | None) -> str:
|
||||
return "입력 — " + ("옵션에서 고름" if (spec or {}).get("고르기") else "직접 적음")
|
||||
if kind == "중간" and leaf is not None and leaf is not node:
|
||||
return _link(leaf, None, None)
|
||||
if kind == "상수":
|
||||
return f"상수 — {node.get('글')}"
|
||||
if kind == "찾기":
|
||||
cond = " · ".join(f"{k} = {v}" for k, v in (node.get("조건식") or {}).items())
|
||||
head = f"표 찾기 — {node.get('표이름') or '표'}"
|
||||
@@ -70,7 +72,9 @@ def definitions(lines: list[dict], row: dict, rows: list[dict], unused) -> list[
|
||||
for line in lines:
|
||||
head, tree = line.get("결과"), line.get("이름식")
|
||||
if line.get("갈래") in ("중간", "결과") and isinstance(tree, dict):
|
||||
if tree.get("갈래") in ("찾기", "요소") or tree.get("꼴") == "블록": # 한 마디 식
|
||||
if tree.get("꼴") == "수": # 상수 — 연결 설명에 그 수
|
||||
leaf[str(line.get("열쇠"))] = {"갈래": "상수", "글": tree.get("글")}
|
||||
elif tree.get("갈래") in ("찾기", "요소") or tree.get("꼴") == "블록": # 한 마디 식
|
||||
leaf[str(line.get("열쇠"))] = tree
|
||||
found = ([head] if head and line.get("갈래") in ("중간", "결과") else []) + visible(
|
||||
tree, []
|
||||
|
||||
Reference in New Issue
Block a user