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:
1 parent
d35e27e7de
commit
4140699007
3 files changed
+11
-7
No files matched your search
+7
-7
@@ -74,6 +74,13 @@
|
||||
<span id="origin" class="muted"></span>
|
||||
</div>
|
||||
<div id="canvas" class="canvas" aria-label="교각 3D 뷰"></div>
|
||||
<div class="rebar-color" id="rebar-color" hidden role="group" aria-label="철근 색 기준">
|
||||
<span class="lbl">색 기준</span>
|
||||
<button type="button" data-color="role" aria-pressed="true">역할</button>
|
||||
<button type="button" data-color="diameter" aria-pressed="false">직경</button>
|
||||
<button type="button" data-color="member" aria-pressed="false">부재</button>
|
||||
<ul id="rebar-legend" class="rebar-legend"></ul>
|
||||
</div>
|
||||
<fieldset class="parts">
|
||||
<legend>부재 표시</legend>
|
||||
<div id="parts"></div>
|
||||
@@ -152,13 +159,6 @@
|
||||
<p class="pnote">형상은 ② 형상계획 기준입니다. 형상이 바뀌면 "형상 바뀜"으로 표시합니다.</p>
|
||||
</aside>
|
||||
<div class="center-col">
|
||||
<div class="rebar-color" id="rebar-color" role="group" aria-label="철근 색 기준">
|
||||
<span class="lbl">색 기준</span>
|
||||
<button type="button" data-color="role" aria-pressed="true">역할</button>
|
||||
<button type="button" data-color="diameter" aria-pressed="false">직경</button>
|
||||
<button type="button" data-color="member" aria-pressed="false">부재</button>
|
||||
<ul id="rebar-legend" class="rebar-legend"></ul>
|
||||
</div>
|
||||
<div class="viewer-slot" id="slot-rebar"></div>
|
||||
<section class="panel viewer" aria-labelledby="rebar-title">
|
||||
<div class="viewer-head"><h2 id="rebar-title">철근표</h2></div>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
Reference in new issue
Block a user