feat(804-5): 줄 쌓기 표 값 이름 · 산출근거 고정 · 그룹 글 · 짝 강조 채우기 · 틀로 저장 걷음(요구 683~685)
- 표 값 기호 화면 이름 = 고른 줄 이름(Q_수량2^표 → Q_특별인부 · 겹치면 2 · 3) — 왼쪽 · 산출근거 같음 · 칸 글은 화면 이름 ↔ 기호로 오감(문서 기호 그대로) - 단위 「줄 따름」 안 보임 · 표 값만 든 묶음 머리 = 「표 값」 · [식으로 풀기] → 「식 고치기」 - 산출근거 = 넓을 때 화면 고정 + 자기 스크롤(높이 = 스크롤 영역) · 나란히 놓는 탭 폭 1240 → 1040 - 글 「항목」 → 「그룹」(그룹 이름 · + 그룹 · 그룹 지움) - 짝 강조 = 왼쪽 카드 · 그룹 머리 · 오른쪽 줄 모두 같은 바탕 채우기(테두리 걷음) - [틀로 저장] · 내 틀 목록(브라우저 저장) 걷음 · 공식 틀 고르기 = M01 단가산출 결과만 - 시험 test_804_4 표 값 화면 이름 1,518 전수(겹침 없음 · 식 글 왕복 같음) 더함 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,6 @@ import { addTaken, type Taken } from "../common_util/common_util_line_stack_copy
|
||||
import type { Layer } from "../M02_MasterTemplete/M02_MasterTemplete_Api_Fetch";
|
||||
import { buildEdit } from "./line_stack_edit";
|
||||
import { buildOut } from "./line_stack_out";
|
||||
import type { Tpl } from "./line_stack_rows";
|
||||
import { lt } from "./line_stack_text";
|
||||
import "./formula_doc.css";
|
||||
import "./line_stack.css";
|
||||
@@ -66,7 +65,6 @@ interface Loaded {
|
||||
판?: string;
|
||||
}
|
||||
|
||||
const TPL_KEY = "lineStack.myTemplates";
|
||||
const clone = <T>(v: T): T => JSON.parse(JSON.stringify(v)) as T;
|
||||
|
||||
export function createStackScreen(opt: StackScreenOptions) {
|
||||
@@ -80,6 +78,13 @@ export function createStackScreen(opt: StackScreenOptions) {
|
||||
attrs: { "data-line-stack": "" },
|
||||
children: [head, notes, el("div", { className: "lstk__areas", children: [left, right] }), foot],
|
||||
});
|
||||
// 산출근거 고정 높이(요구 683) — 스크롤 조상(없으면 창) 높이 · 넓을 때만 고정(line_stack.css)
|
||||
const fit = (): void => {
|
||||
let p = root.parentElement;
|
||||
while (p && !/(auto|scroll)/.test(getComputedStyle(p).overflowY)) p = p.parentElement;
|
||||
root.style.setProperty("--lstk-view", `${p?.clientHeight ?? innerHeight}px`);
|
||||
};
|
||||
window.addEventListener("resize", fit);
|
||||
const cp = opt.copy;
|
||||
let key = "";
|
||||
let shown: string | null = null; // 연 키(같은 키 다시 그림 = 안 읽음 · 탭 바꿈 = force)
|
||||
@@ -136,13 +141,6 @@ export function createStackScreen(opt: StackScreenOptions) {
|
||||
/* 캐시가 막혀도 화면 안 고침은 남음 */
|
||||
}
|
||||
};
|
||||
const templates = (): Tpl[] => {
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem(TPL_KEY) ?? "[]") as Tpl[];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
// ── 셈 ──
|
||||
const usable = (): Record<string, unknown> => {
|
||||
@@ -323,9 +321,7 @@ export function createStackScreen(opt: StackScreenOptions) {
|
||||
subDoc,
|
||||
name: (k) => cache.names.get(k) ?? "",
|
||||
open: blocks,
|
||||
templates,
|
||||
pair: (loc) => pair(loc, "left"),
|
||||
saveTpl: (t) => localStorage.setItem(TPL_KEY, JSON.stringify([...templates(), t])),
|
||||
take: takeCtx(),
|
||||
}),
|
||||
]
|
||||
@@ -348,6 +344,7 @@ export function createStackScreen(opt: StackScreenOptions) {
|
||||
);
|
||||
foot.replaceChildren(...(doc.결과 ? [] : [docFoot(answer)]));
|
||||
pair(paired);
|
||||
fit();
|
||||
};
|
||||
|
||||
const take = (got: Loaded): void => {
|
||||
|
||||
Reference in New Issue
Block a user