Merge remote-tracking branch 'origin/sub_laptop_4' into main_laptop_1

This commit is contained in:
2026-10-26 05:51:58 +09:00
4 changed files with 44 additions and 16 deletions
+26 -4
View File
@@ -1,15 +1,37 @@
/* E03 확률 · 민감도 탭(537-1) — 입력 표 · 히스토그램 · 민감도 선 · 토네이도 막대 */
.e03-prob-vars {
font-size: 12px;
}
.e03-prob-vars input[type="number"] {
width: 5.5em;
width: 4.2em;
}
.e03-prob-vars select {
width: auto;
width: 6.2em;
}
.e03-prob-run {
flex-wrap: wrap;
align-items: flex-end;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px 8px;
margin-top: 8px;
}
.e03-prob-run .ui-field {
min-width: 0;
}
.e03-prob-run select,
.e03-prob-run input {
width: 100%;
}
.e03-prob-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin: 8px 0;
}
.e03-prob-src summary {
+5 -4
View File
@@ -176,7 +176,7 @@ export function createProbPanel(projectId: string, base: string, repaint: () =>
});
return input;
};
const unit = row.kind === "cov" ? t("E03_Pb_Cov") : row.prop === "water" ? "σ m" : "σ";
const unit = row.kind === "cov" ? "" : row.prop === "water" ? "σ m" : "σ";
const label =
row.prop === "water" || row.prop === "ru"
? t(`E03_Pb_Prop_${row.prop}` as LocaleKey)
@@ -199,7 +199,7 @@ export function createProbPanel(projectId: string, base: string, repaint: () =>
function runFields(setup: ProbSetup, slot: string, editable: boolean): HTMLElement {
const r = cache!.run;
const wrap = el("div", { className: "e03-panel__row e03-prob-run" });
const wrap = el("div", { className: "e03-prob-run" });
const set = <K extends keyof typeof r>(k: K, v: (typeof r)[K]): void => {
r[k] = v;
save();
@@ -281,8 +281,9 @@ export function createProbPanel(projectId: string, base: string, repaint: () =>
},
});
reset.disabled = !!busy;
wrap.append(reset, go);
return wrap;
const actions = el("div", { className: "e03-prob-actions" });
actions.append(reset, go);
return el("div", { children: [wrap, actions] });
}
function summary(rec: ProbRecord): HTMLElement {
@@ -12,7 +12,7 @@ import { svgEl } from "./E03_StabSection_UI_Section";
const W = 380;
const H = 200;
const PAD = { l: 44, r: 12, t: 12, b: 28 };
const PAD = { l: 44, r: 12, t: 22, b: 28 };
const fmt = (v: number | null | undefined, d = 2): string =>
v === null || v === undefined || !Number.isFinite(v) ? "-" : v.toFixed(d);
@@ -49,12 +49,13 @@ function frame(
for (const v of xt)
axis.append(svgEl("text", { x: sx(v), y: H - pad.b + 14, "text-anchor": "middle" }, String(v)));
axis.append(svgEl("text", { x: W - pad.r, y: H - 2, "text-anchor": "end" }, xLabel));
axis.append(svgEl("text", { x: 2, y: pad.t - 2 }, yLabel));
axis.append(svgEl("text", { x: 2, y: 10 }, yLabel));
svg.append(axis);
return { svg, sx, sy };
}
function mark(f: Frame, x: number, cls: string, label: string): void {
/** 세로 표지선 · 글 — row = 글 줄(가까운 표지끼리 안 겹치게 아래로) */
function mark(f: Frame, x: number, cls: string, label: string, row = 0): void {
f.svg.append(
svgEl("line", {
x1: f.sx(x),
@@ -63,7 +64,11 @@ function mark(f: Frame, x: number, cls: string, label: string): void {
y2: H - PAD.b,
class: `e03-prob-mark ${cls}`,
}),
svgEl("text", { x: f.sx(x) + 3, y: PAD.t + 10, class: `e03-prob-mark__text ${cls}` }, label),
svgEl(
"text",
{ x: f.sx(x) + 3, y: PAD.t + 10 + 12 * row, class: `e03-prob-mark__text ${cls}` },
label,
),
);
}
@@ -102,8 +107,8 @@ export function histogramChart(
f.svg.append(bar);
});
mark(f, 1, "e03-prob-mark--one", "F = 1");
if (required) mark(f, required, "e03-prob-mark--req", `${t("E03_Required")} ${fmt(required)}`);
if (fsDet) mark(f, fsDet, "e03-prob-mark--det", t("E03_Pb_Det"));
if (required) mark(f, required, "e03-prob-mark--req", `${t("E03_Required")} ${fmt(required)}`, 1);
if (fsDet) mark(f, fsDet, "e03-prob-mark--det", t("E03_Pb_Det"), 2);
return box("prob-hist", f.svg);
}
@@ -118,7 +123,7 @@ export function cdfChart(res: ProbResult, required: number | null): HTMLElement
svgEl("polyline", { points: pointsText(pts), class: "e03-prob-line e03-prob-line--0" }),
);
mark(f, 1, "e03-prob-mark--one", `Pf ${fmt((res.stats.pf ?? 0) * 100, 1)} %`);
if (required) mark(f, required, "e03-prob-mark--req", `${t("E03_Required")} ${fmt(required)}`);
if (required) mark(f, required, "e03-prob-mark--req", `${t("E03_Required")} ${fmt(required)}`, 1);
return box("prob-cdf", f.svg);
}
+1 -1
View File
@@ -228,7 +228,7 @@ export const ui_locales_e03 = {
E03_Pb_Dist: ["분포", "Distribution"],
E03_Pb_Dist_normal: ["정규", "Normal"],
E03_Pb_Dist_lognormal: ["대수정규", "Lognormal"],
E03_Pb_Spread: ["변동", "Spread"],
E03_Pb_Spread: ["변동계수 · σ", "COV · σ"],
E03_Pb_Cov: ["변동계수", "COV"],
E03_Pb_Trunc: ["절단 ±σ 배", "Truncate ±kσ"],
E03_Pb_Prop_c: ["c kPa", "c kPa"],