refactor(copy): 속성 복사를 ② 형상계획 부재 패널에만 두고 ①에서 제거
- 복사 패널을 ② 부재 패널(다시 생성 아래)로 옮김. ①의 수정 카드에는 없음 - ①의 부재 선택 드롭다운과 관련 코드 제거 (②의 부재 목록을 그대로 사용) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a16ee59da
commit
0dbd66d807
2 files changed
+46
-65
No files matched your search
+46
-49
@@ -67,55 +67,6 @@
|
|||||||
<div id="edit-fields"></div>
|
<div id="edit-fields"></div>
|
||||||
<p id="edit-summary" class="muted small"></p>
|
<p id="edit-summary" class="muted small"></p>
|
||||||
<button id="edit-regen" class="btn primary" type="button" disabled>다시 생성 · 변경 0</button>
|
<button id="edit-regen" class="btn primary" type="button" disabled>다시 생성 · 변경 0</button>
|
||||||
<section id="copy-panel" class="copy-panel" aria-labelledby="cp-title">
|
|
||||||
<header class="copy-head">
|
|
||||||
<h3 id="cp-title">속성 복사</h3>
|
|
||||||
<p class="muted small">기준 교각의 설정을 다른 교각에 한 번에 적용합니다</p>
|
|
||||||
</header>
|
|
||||||
<div class="dlg-body">
|
|
||||||
<div class="dlg-col">
|
|
||||||
<section>
|
|
||||||
<h3>1 · 원본 교각</h3>
|
|
||||||
<p id="cp-source" class="num"></p>
|
|
||||||
<p class="muted small">현재 입력값 기준 (미반영 변경 포함)</p>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h3>2 · 대상 교각</h3>
|
|
||||||
<div class="cp-tools">
|
|
||||||
<label class="chk"><input id="cp-same-type" type="checkbox" checked />원본과 같은 형식만</label>
|
|
||||||
<button id="cp-select-same" class="btn-o small" type="button">같은 형식 모두 선택</button>
|
|
||||||
<button id="cp-clear" class="btn-o small" type="button">선택 해제</button>
|
|
||||||
</div>
|
|
||||||
<div id="cp-targets" class="cp-chips"></div>
|
|
||||||
<p class="muted small">고른 교각에만 적용합니다. 고르지 않은 교각은 바뀌지 않습니다. 모델이 없는 교각은 고를 수 없습니다.</p>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h3>3 · 복사할 항목</h3>
|
|
||||||
<div id="cp-member-row" class="cp-tools" hidden>
|
|
||||||
<label class="small">부재 <select id="cp-member"></select></label>
|
|
||||||
</div>
|
|
||||||
<div id="cp-items" class="cp-chips"></div>
|
|
||||||
<p id="cp-none" class="muted small" hidden>이 부재는 복사 항목이 없습니다. 기둥·받침은 예정입니다.</p>
|
|
||||||
<p class="muted small">복사하지 않는 값: 좌표 · IP · 받침 EL · 코핑 상면 EL · 기초 하단 EL · 지반고 · 기둥 높이 · 말뚝 선단 EL · 계단 구간</p>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="dlg-col">
|
|
||||||
<section>
|
|
||||||
<h3>4 · 적용 미리보기 (고른 교각만)</h3>
|
|
||||||
<table id="cp-preview" class="grid-table">
|
|
||||||
<thead><tr><th>대상</th><th>형식</th><th>바뀌는 값</th><th>건너뜀</th><th>내용</th></tr></thead>
|
|
||||||
<tbody></tbody>
|
|
||||||
</table>
|
|
||||||
<label class="chk"><input id="cp-regen" type="checkbox" checked />적용 후 고른 교각만 바로 다시 생성</label>
|
|
||||||
<p class="muted small">적용하면 대상 교각마다 "변경 n건"이 표시되고, 입력 수정 카드에서 항목별로 되돌릴 수 있습니다.</p>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<footer class="copy-foot">
|
|
||||||
<span id="cp-summary" class="muted"></span>
|
|
||||||
<button id="cp-apply" class="btn-p" type="button" disabled>대상을 고르세요</button>
|
|
||||||
</footer>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -197,6 +148,52 @@
|
|||||||
<div id="member-fields"></div>
|
<div id="member-fields"></div>
|
||||||
<p id="member-note" class="muted small"></p>
|
<p id="member-note" class="muted small"></p>
|
||||||
<button id="member-regen" class="btn primary" type="button" disabled>다시 생성 · 변경 0</button>
|
<button id="member-regen" class="btn primary" type="button" disabled>다시 생성 · 변경 0</button>
|
||||||
|
<section id="copy-panel" class="copy-panel" aria-labelledby="cp-title">
|
||||||
|
<header class="copy-head">
|
||||||
|
<h3 id="cp-title">속성 복사</h3>
|
||||||
|
<p class="muted small">기준 교각의 설정을 다른 교각에 한 번에 적용합니다</p>
|
||||||
|
</header>
|
||||||
|
<div class="dlg-body">
|
||||||
|
<div class="dlg-col">
|
||||||
|
<section>
|
||||||
|
<h3>1 · 원본 교각</h3>
|
||||||
|
<p id="cp-source" class="num"></p>
|
||||||
|
<p class="muted small">현재 입력값 기준 (미반영 변경 포함)</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h3>2 · 대상 교각</h3>
|
||||||
|
<div class="cp-tools">
|
||||||
|
<label class="chk"><input id="cp-same-type" type="checkbox" checked />원본과 같은 형식만</label>
|
||||||
|
<button id="cp-select-same" class="btn-o small" type="button">같은 형식 모두 선택</button>
|
||||||
|
<button id="cp-clear" class="btn-o small" type="button">선택 해제</button>
|
||||||
|
</div>
|
||||||
|
<div id="cp-targets" class="cp-chips"></div>
|
||||||
|
<p class="muted small">고른 교각에만 적용합니다. 고르지 않은 교각은 바뀌지 않습니다. 모델이 없는 교각은 고를 수 없습니다.</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h3>3 · 복사할 항목</h3>
|
||||||
|
<div id="cp-items" class="cp-chips"></div>
|
||||||
|
<p id="cp-none" class="muted small" hidden>이 부재는 복사 항목이 없습니다. 기둥·받침은 예정입니다.</p>
|
||||||
|
<p class="muted small">복사하지 않는 값: 좌표 · IP · 받침 EL · 코핑 상면 EL · 기초 하단 EL · 지반고 · 기둥 높이 · 말뚝 선단 EL · 계단 구간</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<div class="dlg-col">
|
||||||
|
<section>
|
||||||
|
<h3>4 · 적용 미리보기 (고른 교각만)</h3>
|
||||||
|
<table id="cp-preview" class="grid-table">
|
||||||
|
<thead><tr><th>대상</th><th>형식</th><th>바뀌는 값</th><th>건너뜀</th><th>내용</th></tr></thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
<label class="chk"><input id="cp-regen" type="checkbox" checked />적용 후 고른 교각만 바로 다시 생성</label>
|
||||||
|
<p class="muted small">적용하면 대상 교각마다 "변경 n건"이 표시되고, 입력 수정 카드에서 항목별로 되돌릴 수 있습니다.</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="copy-foot">
|
||||||
|
<span id="cp-summary" class="muted"></span>
|
||||||
|
<button id="cp-apply" class="btn-p" type="button" disabled>대상을 고르세요</button>
|
||||||
|
</footer>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
-16
@@ -656,8 +656,6 @@ let copyItemChoice = new Set<CopyItem>(DEFAULT_COPY_ITEMS);
|
|||||||
function renderCopyItems(): void {
|
function renderCopyItems(): void {
|
||||||
const box = $('cp-items');
|
const box = $('cp-items');
|
||||||
box.replaceChildren();
|
box.replaceChildren();
|
||||||
const select = $<HTMLSelectElement>('cp-member');
|
|
||||||
if (select.options.length === 0) for (const m of MEMBERS) select.appendChild(new Option(m.label, m.id));
|
|
||||||
const items = copyItemsFor(state.member);
|
const items = copyItemsFor(state.member);
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
const label = el('label', undefined, 'chk');
|
const label = el('label', undefined, 'chk');
|
||||||
@@ -674,7 +672,6 @@ function renderCopyItems(): void {
|
|||||||
box.appendChild(label);
|
box.appendChild(label);
|
||||||
}
|
}
|
||||||
$('cp-none').hidden = items.length > 0;
|
$('cp-none').hidden = items.length > 0;
|
||||||
select.value = state.member;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderCopyTargets(): void {
|
function renderCopyTargets(): void {
|
||||||
@@ -1082,19 +1079,10 @@ function wireRebarPicking(): void {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The 속성 복사 panel sits at the bottom of the 부재별 편집창: the ① edit card, or the ② member panel. */
|
|
||||||
function placeCopyPanel(): void {
|
|
||||||
const host = state.stage === 'plan' ? $('member-regen').parentElement : $('edit-regen').parentElement;
|
|
||||||
if (host) host.appendChild($('copy-panel'));
|
|
||||||
// ① has no 부재 list of its own, so the copy panel carries the selector; ② uses its 부재 list.
|
|
||||||
$('cp-member-row').hidden = state.stage !== 'shape';
|
|
||||||
}
|
|
||||||
|
|
||||||
function setStage(stage: Stage): void {
|
function setStage(stage: Stage): void {
|
||||||
// ① opens on 전체 보기 (default). The button is gone, so 전체 보기 returns each time ① is entered.
|
// ① opens on 전체 보기 (default). The button is gone, so 전체 보기 returns each time ① is entered.
|
||||||
if (stage === 'shape' && state.stage !== 'shape') state.allView = true;
|
if (stage === 'shape' && state.stage !== 'shape') state.allView = true;
|
||||||
state.stage = stage;
|
state.stage = stage;
|
||||||
placeCopyPanel();
|
|
||||||
// Switching 전체 보기 on or off in ① needs the scene rebuilt for the new layout.
|
// Switching 전체 보기 on or off in ① needs the scene rebuilt for the new layout.
|
||||||
if ((allPiers !== null) !== multiSceneOn()) setupScene();
|
if ((allPiers !== null) !== multiSceneOn()) setupScene();
|
||||||
if (state.scene) setRebarView(state.scene, stage === 'rebar');
|
if (state.scene) setRebarView(state.scene, stage === 'rebar');
|
||||||
@@ -3103,10 +3091,6 @@ $<HTMLButtonElement>('cp-clear').addEventListener('click', () => {
|
|||||||
renderCopyTargets();
|
renderCopyTargets();
|
||||||
renderCopyPreview();
|
renderCopyPreview();
|
||||||
});
|
});
|
||||||
$<HTMLSelectElement>('cp-member').addEventListener('change', (ev) => {
|
|
||||||
state.member = (ev.target as HTMLSelectElement).value as MemberId;
|
|
||||||
renderAll();
|
|
||||||
});
|
|
||||||
$<HTMLInputElement>('cp-regen').addEventListener('change', renderCopyPreview);
|
$<HTMLInputElement>('cp-regen').addEventListener('change', renderCopyPreview);
|
||||||
$<HTMLButtonElement>('cp-apply').addEventListener('click', applyCopyPanel);
|
$<HTMLButtonElement>('cp-apply').addEventListener('click', applyCopyPanel);
|
||||||
$<HTMLButtonElement>('sv-save').addEventListener('click', confirmSaveDialog);
|
$<HTMLButtonElement>('sv-save').addEventListener('click', confirmSaveDialog);
|
||||||
|
|||||||
Reference in new issue
Block a user