feat(copy): 복사 항목이 없는 부재(교량받침·기둥)에서는 속성 복사 패널을 숨김

- hasCopyItems 추가, 테스트 2건 (코핑·확대기초·지반은 표시, 교량받침·기둥은 숨김)
- "이 부재는 복사 항목이 없습니다" 문구 제거
- 대응표는 그대로 두어 항목이 생기면 자동으로 다시 표시

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-27 17:03:45 +09:00
1 parent fb09c693c4
commit 278d19faa5
4 files changed
+22 -4

No files matched your search

+14 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import { copyCandidates, copyItemsFor, copyItemsWithOverrides, selectedTargets, type CopyCandidate } from '../src/core/copy-targets';
import { copyCandidates, copyItemsFor, copyItemsWithOverrides, hasCopyItems, selectedTargets, type CopyCandidate } from '../src/core/copy-targets';
import { loadP1 } from './helpers';
const piers: CopyCandidate[] = [
@@ -88,3 +88,16 @@ describe('copyItemsWithOverrides (기준 교각에서 되돌리기가 표시된
expect(copyItemsWithOverrides(source({ groundEl: base.groundEl + 0.5 }))).toEqual([]);
});
});
describe('hasCopyItems (속성 복사 패널을 보일지)', () => {
it('shows the panel for coping, 확대기초·말뚝 and 지반', () => {
expect(hasCopyItems('coping')).toBe(true);
expect(hasCopyItems('footing')).toBe(true);
expect(hasCopyItems('ground')).toBe(true);
});
it('hides the panel for 교량받침 and 기둥 (no copy items yet)', () => {
expect(hasCopyItems('bearing')).toBe(false);
expect(hasCopyItems('column')).toBe(false);
});
});