fix(view): the reference fill also sets A, B and S, so the solplate appears; warn for bearings without solplate values

"도면값 채우기" set only EL.X, h1 and h2, so no solplate was drawn. It now also sets A, B and the solplate slope S from the
reference values. The bearing card warns how many bearings lack A, B or S.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 14:49:50 +09:00
1 parent a50f4f5ee5
commit a108a76707
1 file changed
+7 -1
+7 -1
View File
@@ -1395,11 +1395,17 @@ function renderBearingBasis(wrap: HTMLDivElement, pier: Pier): void {
const fill = el('button', '도면값 채우기 (참조 값)', 'btn small');
fill.type = 'button';
fill.addEventListener('click', () => {
bearingDrawing = { ...bearingDrawing, [name]: BEARING_ELEVATION_REF.map((r) => ({ no: r.no, elx: r.elx, h1: r.h1, h2: r.h2 })) };
// The reference values include A, B (plan) and S (solplate slope), so the solplate can be drawn (승인 2026-10-23).
bearingDrawing = { ...bearingDrawing, [name]: BEARING_ELEVATION_REF.map((r, i) => ({ no: r.no, elx: r.elx, h1: r.h1, h2: r.h2, A: r.A, B: r.B, S: SOLPLATE_REF[i].s })) };
regenerateAllPiers();
renderAll();
});
wrap.appendChild(fill);
const rowsNow = bearingDrawing[name] ?? [];
const missingPlan = pier.input.bearings.filter((b) => !rowsNow.some((d) => d.no === b.no && d.A !== undefined && d.B !== undefined && d.S !== undefined)).length;
if (missingPlan > 0) {
wrap.appendChild(el('p', `솔플레이트 값(A, B, S)이 없는 받침 ${missingPlan}개는 솔플레이트를 그리지 않습니다. 도면을 불러오거나 "도면값 채우기"를 누르세요.`, 'warn-text'));
}
if (bearingBasis === 'drawing' && !bearingDrawing[name]?.length) {
wrap.appendChild(el('p', '도면 값이 없어서 엑셀 z로 계산 중입니다.', 'warn-text'));
}