Merge remote-tracking branch 'origin/dev' into sub_laptop_5
This commit is contained in:
@@ -141,10 +141,6 @@
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.ui-sheet--combo .ui-sheet__meta td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ui-sheet__table tr.is-fixed td {
|
||||
border-bottom: 2px solid var(--color-border);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,8 @@ export function createSheet(host: HTMLElement, input: SheetDoc, opts: SheetOptio
|
||||
opts.onSelect?.(selectionOf(state.doc, r, c));
|
||||
};
|
||||
const move = (dr: number, dc: number): void => {
|
||||
const keys = navRows(state.doc, state.mode).filter((k) => !opts.combo || k !== KEY_UNIT);
|
||||
// 구조물 조합 = 머리만(단위 · 번호 줄 없음) — 방향키는 열만 옮김(머리 = 단위 줄 자리)
|
||||
const keys = opts.combo ? [KEY_UNIT] : navRows(state.doc, state.mode);
|
||||
const cols = state.doc.열;
|
||||
if (!state.sel) {
|
||||
if (keys.length && cols.length) select(keys[0], cols[0].id, true);
|
||||
|
||||
@@ -47,7 +47,7 @@ export interface RenderState {
|
||||
pick?: boolean;
|
||||
/** 머리 · 층 이름을 못 고침(`lockHead`) — 칸 겉모양만. */
|
||||
headLocked?: boolean;
|
||||
/** 구조물 조합 표(`combo`) — 단위 줄 없음 · 열 폭 = 머리 · 번호 글이 한 줄에 들게(저장 폭 안 씀) ·
|
||||
/** 구조물 조합 표(`combo`) — 단위 줄 · 일위대가 · 도면 · 면적산출 줄 없음 · 열 폭 = 머리(저장 폭 안 씀) ·
|
||||
* `headEditable` = 머리 이름 칸을 고칠 수 있음(나무 이름 바꾸기로). */
|
||||
combo?: boolean;
|
||||
headEditable?: boolean;
|
||||
@@ -68,18 +68,6 @@ const columnWidth = (doc: SheetDoc, col: SheetColumn, mins: Map<string, number>)
|
||||
mins.get(col.id) ?? 0,
|
||||
);
|
||||
|
||||
/** 구조물 조합 — 일위대가 · 도면 · 면적산출 줄 글(키 · 번호)이 줄바꿈 없이 들게 최소 폭을 넓힘
|
||||
* (`.ui-sheet__meta td` 글꼴과 같게 잼). */
|
||||
function fitMeta(state: RenderState, cols: SheetColumn[], mins: Map<string, number>): void {
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
||||
const font = `400 ${rem * 0.76}px ${getComputedStyle(document.body).fontFamily}`;
|
||||
for (const col of cols) {
|
||||
const texts = REF_ROWS.map((key) => refText(state, key, col.id));
|
||||
const need = Math.ceil(Math.max(...texts.map((t) => textWidth(t, font)))) + 14;
|
||||
mins.set(col.id, Math.max(mins.get(col.id) ?? 0, need));
|
||||
}
|
||||
}
|
||||
|
||||
/** 머리 칸 글꼴 — 폭 재기용(`.ui-sheet__table thead` 와 같게). */
|
||||
function headFont(): string {
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
||||
@@ -113,7 +101,6 @@ export function renderSheet(state: RenderState): HTMLElement {
|
||||
const names = columnNames(cols);
|
||||
const font = headFont();
|
||||
const mins = headMinWidths(cols, depth, font);
|
||||
if (state.combo) fitMeta(state, cols, mins);
|
||||
const widthDoc = state.combo ? { ...doc, 보기: { ...doc.보기, 열너비: {} } } : doc;
|
||||
// 줄 머리 칸 폭 — 층 이름 · 단위 · 일위대가 · 도면 · 면적산출 · 합계 이름이 안 잘리게
|
||||
const GUTTER = Math.min(
|
||||
@@ -275,7 +262,8 @@ ${formulaLabel(formula, names)}`
|
||||
for (const [p, page] of plan.entries()) {
|
||||
const body = el("tbody", {
|
||||
children: [
|
||||
...(mode === "master" && p === 0 ? MASTER_ROWS.map(masterRow) : []),
|
||||
// 구조물 조합 = 일위대가 · 도면 · 면적산출 키 줄 안 보임(보기만 · 번호는 장부 · 카드에)
|
||||
...(mode === "master" && p === 0 && !state.combo ? MASTER_ROWS.map(masterRow) : []),
|
||||
...page.rows.map((row, i) => dataRow(row, page.first + i)),
|
||||
...(page.totals ? totalRows() : []),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user