fix(sheet): 글 열(꼴=글)의 일위대가 · 도면 · 산출근거 칸은 빈칸 · 잠김
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Kyw9qnkJ94pC1A4PfpDtA
This commit is contained in:
@@ -14,6 +14,7 @@ import { columnNames, formulaLabel, headMinWidths, textWidth } from "./ui_templa
|
||||
import {
|
||||
cellEditable,
|
||||
isBoundColumn,
|
||||
isBlankPick,
|
||||
isCalcColumn,
|
||||
KEY_BASIS,
|
||||
KEY_DRAWING,
|
||||
@@ -64,7 +65,7 @@ function headFont(): string {
|
||||
|
||||
/** 칸을 고칠 수 있나 — 줄 열쇠 기준(머리 칸은 따로) · 도면 · 산출근거 줄은 손으로 못 침. */
|
||||
export function keyEditable(state: RenderState, key: string, col: SheetColumn): boolean {
|
||||
if (key === KEY_DRAWING || key === KEY_BASIS) return false;
|
||||
if (key === KEY_DRAWING || key === KEY_BASIS || isBlankPick(key, col)) return false;
|
||||
if (key.startsWith("s:")) return state.mode === "master";
|
||||
if (key.startsWith("t:")) return false;
|
||||
const row = state.doc.줄.find((r) => `d:${r.id}` === key);
|
||||
@@ -178,8 +179,10 @@ export function renderSheet(state: RenderState): HTMLElement {
|
||||
)[key];
|
||||
const tr = el("tr", { className: "ui-sheet__meta", children: [gutter("th", st(label))] });
|
||||
cols.forEach((col, j) => {
|
||||
const text =
|
||||
key === "s:formula"
|
||||
const blank = isBlankPick(key, col);
|
||||
const text = blank
|
||||
? ""
|
||||
: key === "s:formula"
|
||||
? formulaLabel(col.식 ?? "", names, col.id)
|
||||
: key === "s:desc"
|
||||
? ""
|
||||
@@ -188,7 +191,7 @@ export function renderSheet(state: RenderState): HTMLElement {
|
||||
: (col.일위대가 ?? "");
|
||||
const td = bodyCell(key, col, j, text);
|
||||
td.classList.remove("is-num");
|
||||
if (state.pick && PICK_ROWS.includes(key)) td.classList.add("is-pick");
|
||||
if (state.pick && PICK_ROWS.includes(key) && !blank) td.classList.add("is-pick");
|
||||
if (key === "s:formula" && col.식) {
|
||||
// 같은 종류 열은 짧은 이름 · 풍선은 긴 이름 + 고칠 때 쓰는 id 식
|
||||
td.textContent = "";
|
||||
|
||||
Reference in New Issue
Block a user