feat(copy): 복사 항목이 없는 부재(교량받침·기둥)에서는 속성 복사 패널을 숨김
- hasCopyItems 추가, 테스트 2건 (코핑·확대기초·지반은 표시, 교량받침·기둥은 숨김) - "이 부재는 복사 항목이 없습니다" 문구 제거 - 대응표는 그대로 두어 항목이 생기면 자동으로 다시 표시 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb09c693c4
commit
278d19faa5
4 files changed
+22
-4
No files matched your search
@@ -39,6 +39,11 @@ export const MEMBER_COPY_ITEMS: Record<MemberId, CopyItem[]> = {
|
||||
ground: ['ground-position'],
|
||||
};
|
||||
|
||||
/** Whether the 속성 복사 panel is shown for the 부재: only when it has copy items. */
|
||||
export function hasCopyItems(member: MemberId): boolean {
|
||||
return copyItemsFor(member).length > 0;
|
||||
}
|
||||
|
||||
/** The copy items for the selected 부재. */
|
||||
export function copyItemsFor(member: MemberId): CopyItem[] {
|
||||
return MEMBER_COPY_ITEMS[member];
|
||||
|
||||
+3
-2
@@ -9,7 +9,7 @@ import { buildTemplateWorkbook } from './core/template';
|
||||
import { EDITABLE_FIELDS, FIELD_LABELS, overrideKeys, pendingKeys, revertDraft, type EditableKey, type PierValues } from './core/changes';
|
||||
import { adjustRow, layoutText, resolveRowCounts, rowLayout, totalPiles } from './core/piles';
|
||||
import { applyCopy, COPY_ITEMS, planCopy, type CopyItem } from './core/copy';
|
||||
import { copyCandidates, copyItemsFor, copyItemsWithOverrides, selectedTargets, type CopyCandidate } from './core/copy-targets';
|
||||
import { copyCandidates, copyItemsFor, copyItemsWithOverrides, hasCopyItems, selectedTargets, type CopyCandidate } from './core/copy-targets';
|
||||
import { pileGeometry } from './core/geometry';
|
||||
import { rebarSummary, type RebarRow } from './core/rebar/summary';
|
||||
import { shearSegments } from './core/rebar/coping';
|
||||
@@ -678,7 +678,8 @@ function renderCopyItems(): void {
|
||||
label.append(check, document.createTextNode(COPY_ITEMS[item].label));
|
||||
box.appendChild(label);
|
||||
}
|
||||
$('cp-none').hidden = items.length > 0;
|
||||
// The panel is hidden for a 부재 without copy items (교량받침·기둥 are 예정).
|
||||
$('copy-panel').hidden = !hasCopyItems(state.member);
|
||||
}
|
||||
|
||||
function renderCopyTargets(): void {
|
||||
|
||||
Reference in new issue
Block a user