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
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user