fix(view): move the ③ colour control into the 3D viewer window

The colour basis control and legend sit below the 3D canvas and show only on ③, so they belong to the model window.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-23 09:12:31 +09:00
1 parent d35e27e7de
commit 4140699007
3 files changed
+11 -7

No files matched your search

+3
View File
@@ -709,6 +709,7 @@ function placeViewer(stage: 'shape' | 'plan' | 'rebar'): void {
const slot = stage === 'plan' ? $<HTMLElement>('slot-plan') : stage === 'rebar' ? $<HTMLElement>('slot-rebar') : null;
if (slot) slot.appendChild(block);
else if (viewerHome.parent) viewerHome.parent.insertBefore(block, viewerHome.next);
renderRebarColor();
resize();
}
@@ -771,6 +772,8 @@ const REBAR_MEMBERS: { id: RebarRow['member']; label: string }[] = [
/** 3D colour basis buttons on ③ and their legend (spec §6.7). */
function renderRebarColor(): void {
// The colour control lives in the 3D window and is shown only on ③.
$<HTMLDivElement>('rebar-color').hidden = state.stage !== 'rebar';
for (const b of document.querySelectorAll<HTMLButtonElement>('#rebar-color button')) {
b.setAttribute('aria-pressed', String(b.dataset.color === state.rebarColor));
}
+1
View File
@@ -705,3 +705,4 @@ body { background: #eef1f4; font-family: 'Noto Sans KR', system-ui, sans-serif;
.rebar-legend { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rebar-legend-item { display: flex; align-items: center; gap: 6px; }
.rebar-legend .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.rebar-color[hidden] { display: none; }