@floless/app 0.113.5 → 0.113.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/floless-server.cjs
CHANGED
|
@@ -54472,7 +54472,7 @@ function appVersion() {
|
|
|
54472
54472
|
return resolveVersion({
|
|
54473
54473
|
isSea: isSea2(),
|
|
54474
54474
|
sqVersionXml: readSqVersionXml(),
|
|
54475
|
-
define: true ? "0.113.
|
|
54475
|
+
define: true ? "0.113.6" : void 0,
|
|
54476
54476
|
pkgVersion: readPkgVersion()
|
|
54477
54477
|
});
|
|
54478
54478
|
}
|
|
@@ -54488,7 +54488,7 @@ function resolveChannel(s) {
|
|
|
54488
54488
|
function appChannel() {
|
|
54489
54489
|
return resolveChannel({
|
|
54490
54490
|
isSea: isSea2(),
|
|
54491
|
-
define: true ? "0.113.
|
|
54491
|
+
define: true ? "0.113.6" : void 0,
|
|
54492
54492
|
// argv[1] is the entry the runtime actually loaded (…/dist/floless-server.cjs), which is what
|
|
54493
54493
|
// carries the npx cache prefix. Absent under the SEA exe, which never reaches the npx branch.
|
|
54494
54494
|
modulePath: process.argv[1]
|
|
@@ -2869,7 +2869,7 @@ const geoMode = () => (api && api.geoMode && api.geoMode()) || null;
|
|
|
2869
2869
|
let workPlane = null; // {origin:[x,y,z]mm, normal, xAxis} | null
|
|
2870
2870
|
let wpMode = null; // 'face' | '3pt' — armed set-plane pick mode
|
|
2871
2871
|
let wpDraft = null; // 3pt picks collected so far
|
|
2872
|
-
let wpVisible =
|
|
2872
|
+
let wpVisible = (() => { try { return localStorage.getItem('steel:wpVisible:v1') === '1'; } catch { return false; } })(); // reference surface is opt-in; remember both on and off without changing the active plane
|
|
2873
2873
|
let wpGroup = null;
|
|
2874
2874
|
let wpExtent = null; // test-observability: the projected u/v footprint the last-rendered "Show plane" surface was sized to (null = fallback square)
|
|
2875
2875
|
// ---- 3D local drawing frame (UCS, stage 1): a SEPARATE rotate-about-Z frame for skewed framing.
|
|
@@ -3211,7 +3211,7 @@ function setWorkPlanePrincipal(kind, offsetMm) {
|
|
|
3211
3211
|
wpMode = null; wpDraft = null; invalidatePointEntry('drift'); renderWorkPlane(); reflectWpBar();
|
|
3212
3212
|
}
|
|
3213
3213
|
function clearWorkPlane() { workPlane = null; wpMode = null; wpDraft = null; invalidatePointEntry('drift'); renderWorkPlane(); reflectWpBar(); }
|
|
3214
|
-
function toggleWorkPlaneVisible(on) { wpVisible = on === undefined ? !wpVisible : !!on; renderWorkPlane(); }
|
|
3214
|
+
function toggleWorkPlaneVisible(on) { wpVisible = on === undefined ? !wpVisible : !!on; try { localStorage.setItem('steel:wpVisible:v1', wpVisible ? '1' : '0'); } catch { /* storage can be unavailable; keep the session preference */ } renderWorkPlane(); }
|
|
3215
3215
|
function workPlaneInfo() { return { set: !!workPlane, mode: wpMode, visible: wpVisible, plane: workPlane ? { origin: [...workPlane.origin], normal: [...workPlane.normal], xAxis: [...workPlane.xAxis] } : null }; }
|
|
3216
3216
|
// face pick: the clip tool's raycast, minus the camera-side flip — the plane lands ON the face.
|
|
3217
3217
|
function wpFacePick(cx, cy) {
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
*::-webkit-scrollbar-thumb{background:#475569;border-radius:6px;border:2px solid transparent;background-clip:content-box}
|
|
10
10
|
*::-webkit-scrollbar-thumb:hover{background:#5b6b85;background-clip:content-box}
|
|
11
11
|
*::-webkit-scrollbar-corner{background:transparent}
|
|
12
|
-
*{box-sizing:border-box}
|
|
13
|
-
|
|
12
|
+
*{box-sizing:border-box} html{width:100%;height:100%;overflow:hidden}
|
|
13
|
+
body{margin:0;background:var(--bg);color:var(--text);font:13px system-ui;width:100%;max-width:100%;height:100vh;overflow:hidden;display:flex;flex-direction:column}
|
|
14
|
+
header{display:flex;flex-wrap:wrap;align-items:center;gap:14px;min-width:0;max-width:100%;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--line)}
|
|
14
15
|
header b{font-size:14px} .stat{color:var(--mut)} .stat b{color:var(--text)}
|
|
15
16
|
header .tb-sep{width:1px;height:20px;background:var(--line);flex:0 0 auto;align-self:center} /* thin divider grouping the header action clusters (history | tools | AI | more) */
|
|
16
17
|
#dim3dWrap{gap:8px} /* 3D Dimension cluster in the header — display flips inline-flex/none by view (applyViewState) */
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
body.model-ro:not(.v3d) #ro2d{display:flex}
|
|
35
36
|
#ro2d b{color:var(--text);font-size:14px}
|
|
36
37
|
#ro2d p{margin:0;max-width:44ch;line-height:1.5}
|
|
37
|
-
main{flex:1;display:flex;min-height:0}
|
|
38
|
+
main{flex:1;display:flex;min-width:0;min-height:0;width:100%;max-width:100%;overflow:hidden;position:relative}
|
|
38
39
|
#stagewrap{flex:1;position:relative;min-width:0;display:flex}
|
|
39
40
|
#stage{flex:1;overflow:auto;background:#0b1220;display:flex;align-items:safe center;justify-content:safe center}
|
|
40
41
|
svg{display:block;touch-action:none;flex:none}
|
|
@@ -63,6 +64,11 @@
|
|
|
63
64
|
#panelResizer::before{content:"";position:absolute;inset:0 3px;border-radius:2px;transition:background-color .12s}
|
|
64
65
|
#panelResizer:hover::before,#panelResizer.drag::before{background:var(--brand)}
|
|
65
66
|
#panelResizer:focus-visible{outline:none} #panelResizer:focus-visible::before{background:var(--brand)}
|
|
67
|
+
#panelToggle{position:absolute;right:calc(var(--panelw,240px) - 14px);top:50%;transform:translateY(-50%);z-index:12;width:28px;height:42px;padding:0;display:flex;align-items:center;justify-content:center;background:var(--panel);border-color:var(--line);box-shadow:0 4px 14px rgba(0,0,0,.45);font-size:18px;line-height:1}
|
|
68
|
+
#panelToggle:hover{border-color:var(--brand)}
|
|
69
|
+
#panelToggle:focus-visible,#m3dLegendCollapse:focus-visible,#m3dLegendLauncher:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
|
|
70
|
+
body.panel-collapsed #panel,body.panel-collapsed #panelResizer{display:none}
|
|
71
|
+
body.panel-collapsed #panelToggle{right:4px}
|
|
66
72
|
aside h3{margin:0 0 8px;font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.05em}
|
|
67
73
|
select,input{background:#0f172a;color:var(--text);border:1px solid #475569;border-radius:6px;padding:6px;width:100%;font:13px system-ui}
|
|
68
74
|
.row{margin:8px 0} .danger{background:#7f1d1d;border-color:#991b1b} .danger:hover{background:#991b1b}
|
|
@@ -596,7 +602,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
596
602
|
circle.handle.ep-end{fill:#f472b6;stroke:#0b1220;stroke-width:2}
|
|
597
603
|
.epdot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:middle}
|
|
598
604
|
/* 3D-only floating chrome (parity with AWARE viewer-3d): toolbar TL, legend BL, ViewCube BR */
|
|
599
|
-
#m3dBar{position:absolute;top:12px;left:12px;display:none;gap:6px;align-items:center;z-index:59} /*
|
|
605
|
+
#m3dBar{position:absolute;top:12px;left:12px;right:12px;display:none;flex-wrap:wrap;gap:6px;align-items:center;z-index:59} /* bounded to the stage so narrow windows wrap this local toolbar instead of widening the whole document; above floating dim-label chips (57), below toasts (60) */
|
|
600
606
|
#m3dBar .seg-group,#m3dBar>button{box-shadow:0 4px 14px rgba(0,0,0,.45)}
|
|
601
607
|
#m3dBar>button{font-size:12px;padding:5px 9px}
|
|
602
608
|
#m3dBar .m3dwrap{position:relative;display:inline-flex}
|
|
@@ -697,9 +703,15 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
697
703
|
#m3dLegend .lrow.clip.sel .clab{color:var(--text)} /* selection is shown by the row-level .sel styling above (brand left-border + tint); the box is the enable toggle now */
|
|
698
704
|
/* Panel shell (Objects | Views | Favourites tabs). The OUTER panel no longer scrolls — it caps the height and
|
|
699
705
|
lays out [tab strip][active body]; each tab body is its own scroll container (themed by the global * rule). */
|
|
700
|
-
#m3dLegend{position:absolute;left:12px;bottom:64px;display:none;flex-direction:column;max-height:52vh;min-width:210px;max-width:min(340px,92vw);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:0;z-index:6;box-shadow:0 4px 14px rgba(0,0,0,.45);font-size:12px}
|
|
706
|
+
#m3dLegend{position:absolute;left:12px;bottom:64px;display:none;flex-direction:column;max-height:min(52vh,calc(100% - var(--m3d-legend-clearance,184px)));min-width:210px;max-width:min(340px,92vw);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:0;z-index:6;box-shadow:0 4px 14px rgba(0,0,0,.45);font-size:12px} /* the measured clearance tracks however many rows the narrow toolbar wraps onto */
|
|
707
|
+
#m3dLegendCollapse{flex:none;width:28px;padding:0;border:1px solid #475569;border-radius:6px;background:transparent;color:var(--mut);box-shadow:none;font-size:15px}
|
|
708
|
+
#m3dLegendCollapse:hover{color:var(--text);background:#334155}
|
|
709
|
+
#m3dLegendLauncher{position:absolute;left:12px;bottom:12px;z-index:12;width:34px;height:34px;display:none;align-items:center;justify-content:center;padding:0;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.45);color:var(--mut)}
|
|
710
|
+
#m3dLegendLauncher:hover{color:var(--text);border-color:var(--brand)}
|
|
711
|
+
#m3dLegendLauncher svg{display:block}
|
|
701
712
|
/* Tab strip — the .seg-group segmented look, full-width across the panel top; sticky so it never scrolls away. */
|
|
702
|
-
#
|
|
713
|
+
#m3dPanelHeader{display:flex;flex:none;align-items:stretch;gap:6px;border-bottom:1px solid var(--line);padding:7px 8px 6px}
|
|
714
|
+
#m3dTabs{display:flex;flex:1;min-width:0;gap:0}
|
|
703
715
|
#m3dTabs .m3dtab{flex:1;background:transparent;border:1px solid #475569;border-right-width:0;border-radius:0;color:var(--mut);font-size:11px;padding:5px 4px;cursor:pointer;box-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
704
716
|
#m3dTabs .m3dtab:first-child{border-top-left-radius:6px;border-bottom-left-radius:6px}
|
|
705
717
|
#m3dTabs .m3dtab:last-child{border-right-width:1px;border-top-right-radius:6px;border-bottom-right-radius:6px}
|
|
@@ -1095,7 +1107,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
1095
1107
|
<input id=m3dWpOff inputmode=decimal placeholder="16'-6" autocomplete=off data-tip="Offset along the plane normal (ft-in)">
|
|
1096
1108
|
</div>
|
|
1097
1109
|
<hr>
|
|
1098
|
-
<label data-tip="Show or hide the reference plane surface"><input type=checkbox id=m3dWpShow
|
|
1110
|
+
<label data-tip="Show or hide the reference plane surface"><input type=checkbox id=m3dWpShow> Show plane</label>
|
|
1099
1111
|
<button data-wp=reset data-tip="Back to the active plan's level">Reset to level</button>
|
|
1100
1112
|
</div>
|
|
1101
1113
|
</div>
|
|
@@ -1111,15 +1123,19 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
1111
1123
|
</div>
|
|
1112
1124
|
</div>
|
|
1113
1125
|
<div id=m3dLegend>
|
|
1114
|
-
<div id=
|
|
1115
|
-
<
|
|
1116
|
-
|
|
1117
|
-
|
|
1126
|
+
<div id=m3dPanelHeader>
|
|
1127
|
+
<div id=m3dTabs role=tablist aria-label="3D panel tabs">
|
|
1128
|
+
<button class=m3dtab role=tab data-tab=objects aria-selected=true data-tip="Objects — show / hide, isolate, and search the model's parts">Objects</button>
|
|
1129
|
+
<button class=m3dtab role=tab data-tab=views aria-selected=false data-tip="Saved views — save, switch, and manage named viewpoints">Views</button>
|
|
1130
|
+
<button class=m3dtab role=tab data-tab=fav aria-selected=false data-tip="Favourite connections — save and re-apply detailed connections">Favourites</button>
|
|
1131
|
+
</div>
|
|
1132
|
+
<button id=m3dLegendCollapse aria-label="Collapse 3D panel" aria-controls="m3dLegendBody m3dViewsBody m3dFavBody" aria-expanded=true data-tip="Collapse Objects, Views, and Favourites to the bottom-left corner">⌄</button>
|
|
1118
1133
|
</div>
|
|
1119
1134
|
<div id=m3dLegendBody class="m3dbody on" role=tabpanel aria-label=Objects></div>
|
|
1120
1135
|
<div id=m3dViewsBody class=m3dbody role=tabpanel aria-label=Views></div>
|
|
1121
1136
|
<div id=m3dFavBody class=m3dbody role=tabpanel aria-label=Favourites></div>
|
|
1122
1137
|
</div>
|
|
1138
|
+
<button id=m3dLegendLauncher aria-label="Open 3D panel" aria-controls=m3dLegend aria-expanded=false data-tip="Open Objects, Views, and Favourites"><svg width=17 height=17 viewBox="0 0 17 17" fill=none stroke=currentColor stroke-width=1.4 aria-hidden=true><rect x=2.5 y=2.5 width=12 height=12 rx=2></rect><path d="M6.5 3v11M7 6h7M7 10h7"></path></svg></button>
|
|
1123
1139
|
<div id=m3dCube data-tip="Click a face for that view · right-drag to orbit"></div>
|
|
1124
1140
|
<div id=m3dAxes></div>
|
|
1125
1141
|
<div id=zoombar>
|
|
@@ -1159,6 +1175,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
1159
1175
|
<div id=panelResizer role=separator aria-orientation=vertical aria-label="Resize properties panel" tabindex=0 data-tip="Drag to resize · double-click to reset"></div>
|
|
1160
1176
|
<span id=connectionTruthStatus class=sr-only role=status aria-live=polite aria-atomic=true></span>
|
|
1161
1177
|
<aside id=panel></aside>
|
|
1178
|
+
<button id=panelToggle aria-label="Collapse properties panel" aria-controls=panel aria-expanded=true data-tip="Collapse properties panel">›</button>
|
|
1162
1179
|
</main>
|
|
1163
1180
|
<datalist id=conntypes><option>moment</option><option>drag</option><option>shear</option><option>braced</option><option>pinned</option><option>fixed</option></datalist>
|
|
1164
1181
|
<datalist id=profiles></datalist>
|
|
@@ -6740,6 +6757,16 @@ reflectOriginGrid();
|
|
|
6740
6757
|
rz.addEventListener('keydown',e=>{if(e.key==='ArrowLeft'){e.preventDefault();apply(curW()+(e.shiftKey?40:12),true);}else if(e.key==='ArrowRight'){e.preventDefault();apply(curW()-(e.shiftKey?40:12),true);}});
|
|
6741
6758
|
window.addEventListener('resize',()=>{if(root.style.getPropertyValue('--panelw'))apply(curW(),false);}); // re-clamp if the viewport shrank
|
|
6742
6759
|
})();
|
|
6760
|
+
// Properties panel: collapse the inspector and its resizer as one unit, but retain the user's saved width.
|
|
6761
|
+
// The edge button lives outside #panel because panel() replaces that aside's contents on every selection.
|
|
6762
|
+
(function(){
|
|
6763
|
+
const b=document.getElementById('panelToggle');if(!b)return;
|
|
6764
|
+
const KEY='steel:propertiesPanelCollapsed:v1';
|
|
6765
|
+
let collapsed=false;try{collapsed=localStorage.getItem(KEY)==='1';}catch(_){}
|
|
6766
|
+
const reflect=()=>{document.body.classList.toggle('panel-collapsed',collapsed);b.textContent=collapsed?'‹':'›';b.setAttribute('aria-expanded',String(!collapsed));const label=collapsed?'Open properties panel':'Collapse properties panel';b.setAttribute('aria-label',label);b.dataset.tip=label;};
|
|
6767
|
+
b.onclick=()=>{collapsed=!collapsed;try{localStorage.setItem(KEY,collapsed?'1':'0');}catch(_){}reflect();b.focus();};
|
|
6768
|
+
reflect();
|
|
6769
|
+
})();
|
|
6743
6770
|
// --- Selection-filter toolbar (Select bar): same discipline as the snap bar — selFilter is the one source
|
|
6744
6771
|
// of truth; the 4 class switches + the two type flyouts (Members / Connections) all reflect off it, and every
|
|
6745
6772
|
// toggle persists + re-renders. Tekla-style: a switch gates what future picks CAN select — it does NOT
|
|
@@ -7644,8 +7671,23 @@ function retypeProfile(profKey,cat){if(!memberTypeKnown(cat))return;
|
|
|
7644
7671
|
// A saved view is an opaque, versioned snapshot: {v,id,name,order,camera,projection,mode,clips,objects}.
|
|
7645
7672
|
// ════════════════════════════════════════════════════════════════════════════════════════════════════════════
|
|
7646
7673
|
let legendTab=(()=>{const t=localStorage.getItem('floless.legendTab');return (t==='views'||t==='fav')?t:'objects';})();
|
|
7674
|
+
let legendCollapsed=(()=>{try{return localStorage.getItem('steel:3dPanelCollapsed:v1')==='1';}catch(_){return false;}})();
|
|
7647
7675
|
let legendTabsWired=false;
|
|
7648
7676
|
function saveLegendTab(){try{localStorage.setItem('floless.legendTab',legendTab);}catch{}}
|
|
7677
|
+
function reflectLegendPanel(){
|
|
7678
|
+
const p=document.getElementById('m3dLegend'),launch=document.getElementById('m3dLegendLauncher'),collapse=document.getElementById('m3dLegendCollapse');
|
|
7679
|
+
syncLegendClearance();
|
|
7680
|
+
const open=!!view3d&&!legendCollapsed;
|
|
7681
|
+
if(p)p.style.display=open?'flex':'none';
|
|
7682
|
+
if(launch){launch.style.display=view3d&&legendCollapsed?'flex':'none';launch.setAttribute('aria-expanded',String(open));}
|
|
7683
|
+
if(collapse)collapse.setAttribute('aria-expanded',String(open));
|
|
7684
|
+
updateViewsBtn();
|
|
7685
|
+
}
|
|
7686
|
+
function setLegendPanelCollapsed(on,moveFocus){
|
|
7687
|
+
legendCollapsed=!!on;try{localStorage.setItem('steel:3dPanelCollapsed:v1',legendCollapsed?'1':'0');}catch(_){}
|
|
7688
|
+
reflectLegendPanel();
|
|
7689
|
+
if(moveFocus)(legendCollapsed?document.getElementById('m3dLegendLauncher'):document.getElementById('m3dLegendCollapse'))?.focus();
|
|
7690
|
+
}
|
|
7649
7691
|
// Switch the active tab: light the strip button, show that body, render it on demand, persist the choice.
|
|
7650
7692
|
function setLegendTab(tab){if(tab!=='objects'&&tab!=='views'&&tab!=='fav')tab='objects';legendTab=tab;saveLegendTab();
|
|
7651
7693
|
document.querySelectorAll('#m3dTabs .m3dtab').forEach(b=>{const on=b.dataset.tab===tab;b.classList.toggle('on',on);b.setAttribute('aria-selected',String(on));});
|
|
@@ -7658,11 +7700,26 @@ function setLegendTab(tab){if(tab!=='objects'&&tab!=='views'&&tab!=='fav')tab='o
|
|
|
7658
7700
|
// The 3D-toolbar Views button lights (.on) while the panel is open on the Views tab.
|
|
7659
7701
|
function updateViewsBtn(){const vb=document.getElementById('m3dViewsBtn');if(!vb)return;const p=document.getElementById('m3dLegend');vb.classList.toggle('on',!!(p&&p.style.display!=='none'&&legendTab==='views'));}
|
|
7660
7702
|
// Show the whole panel (used on 3D entry + by the toolbar Views button); optionally force a tab.
|
|
7661
|
-
function showLegendPanel(tab){
|
|
7703
|
+
function showLegendPanel(tab,forceOpen){if(forceOpen)setLegendPanelCollapsed(false);setLegendTab(tab||legendTab);reflectLegendPanel();}
|
|
7662
7704
|
// Wire the tab strip once (its buttons persist across build3DLegend rebuilds).
|
|
7663
7705
|
function wireLegendTabs(){if(legendTabsWired)return;legendTabsWired=true;
|
|
7664
7706
|
document.querySelectorAll('#m3dTabs .m3dtab').forEach(b=>b.addEventListener('click',()=>setLegendTab(b.dataset.tab)));
|
|
7707
|
+
const collapse=document.getElementById('m3dLegendCollapse'),launch=document.getElementById('m3dLegendLauncher');
|
|
7708
|
+
if(collapse)collapse.onclick=()=>setLegendPanelCollapsed(true,true);
|
|
7709
|
+
if(launch)launch.onclick=()=>setLegendPanelCollapsed(false,true);
|
|
7710
|
+
}
|
|
7711
|
+
wireLegendTabs(); // the panel shell is static markup — wire it immediately so its controls never depend on an async 3D rebuild completing first
|
|
7712
|
+
// Keep the bottom-left panel below the toolbar's real wrapped height. ResizeObserver also catches
|
|
7713
|
+
// width changes caused by the properties panel opening/closing, not just window resizes.
|
|
7714
|
+
function syncLegendClearance(){
|
|
7715
|
+
const stage=document.getElementById('stagewrap'),bar=document.getElementById('m3dBar');if(!stage||!bar)return;
|
|
7716
|
+
const sr=stage.getBoundingClientRect(),br=bar.getBoundingClientRect();
|
|
7717
|
+
const clearance=Math.ceil(Math.max(0,br.bottom-sr.top)+72)+'px'; // 8px gap + 64px bottom chrome
|
|
7718
|
+
if(stage.style.getPropertyValue('--m3d-legend-clearance')!==clearance)stage.style.setProperty('--m3d-legend-clearance',clearance);
|
|
7665
7719
|
}
|
|
7720
|
+
let legendClearanceObserver=null;
|
|
7721
|
+
if(typeof ResizeObserver!=='undefined'){legendClearanceObserver=new ResizeObserver(syncLegendClearance);legendClearanceObserver.observe(document.getElementById('m3dBar'));}
|
|
7722
|
+
window.addEventListener('resize',syncLegendClearance);
|
|
7666
7723
|
// ── Views state ──────────────────────────────────────────────────────────────────────────────────────────────
|
|
7667
7724
|
let viewsQuery=''; // transient Views-tab search filter — NOT persisted
|
|
7668
7725
|
let viewsSearchOpen=false; // is the search input revealed?
|
|
@@ -8545,7 +8602,7 @@ function wire3DBar(){if(bar3dWired||!window.Steel3DView)return;bar3dWired=true;
|
|
|
8545
8602
|
}
|
|
8546
8603
|
document.getElementById('m3dIso').onclick=()=>{if(d3.isIsolated())d3.clearIsolation();else d3.isolateSelected();}; // onIsolateChange refreshes the button label/visibility
|
|
8547
8604
|
// Views toolbar button: open the panel on the Views tab (or, if it's already open on Views, toggle it closed — a natural toolbar toggle).
|
|
8548
|
-
{const vb=document.getElementById('m3dViewsBtn');if(vb)vb.onclick=()=>{const p=document.getElementById('m3dLegend');const openOnViews=p&&p.style.display!=='none'&&legendTab==='views';if(openOnViews)
|
|
8605
|
+
{const vb=document.getElementById('m3dViewsBtn');if(vb)vb.onclick=()=>{const p=document.getElementById('m3dLegend');const openOnViews=p&&p.style.display!=='none'&&legendTab==='views';if(openOnViews)setLegendPanelCollapsed(true);else{wireLegendTabs();showLegendPanel('views',true);}updateViewsBtn();};}
|
|
8549
8606
|
// Work area: the ▢ Work area button opens a menu (Set to all objects / Define from selection / Show work area).
|
|
8550
8607
|
const workBtn=document.getElementById('m3dWork'),workMenu=document.getElementById('m3dWorkMenu');
|
|
8551
8608
|
function workMenuOutside(e){if(!workMenu.contains(e.target)&&e.target!==workBtn)workMenuClose();}
|
|
@@ -8570,7 +8627,7 @@ function wire3DBar(){if(bar3dWired||!window.Steel3DView)return;bar3dWired=true;
|
|
|
8570
8627
|
wpMenu.querySelectorAll('button[data-wpp]').forEach(b=>b.onclick=()=>{wpMenuClose();
|
|
8571
8628
|
const offIn=parseLen(document.getElementById('m3dWpOff').value)||0; // ft-in → inches → mm along the normal
|
|
8572
8629
|
d3.setWorkPlanePrincipal(b.dataset.wpp,offIn*25.4);});
|
|
8573
|
-
document.getElementById('m3dWpShow').onchange=e=>{d3.toggleWorkPlaneVisible(e.target.checked);};
|
|
8630
|
+
{const show=document.getElementById('m3dWpShow');show.checked=d3.workPlaneInfo().visible;show.onchange=e=>{d3.toggleWorkPlaneVisible(e.target.checked);};}
|
|
8574
8631
|
document.getElementById('m3dWpOff').addEventListener('keydown',ev=>{ev.stopPropagation();if(ev.key==='Enter'){ev.preventDefault();const xy=wpMenu.querySelector('button[data-wpp=xy]');if(xy)xy.click();}});} // Enter in the offset = apply XY (the common case); stopPropagation keeps editor shortcuts out
|
|
8575
8632
|
function applyViewState(on){ // flip the toggle + swap the canvases (no 3D side effects)
|
|
8576
8633
|
view3d=on;
|
|
@@ -8594,7 +8651,7 @@ function applyViewState(on){ // flip the toggle + swap the canvases (
|
|
|
8594
8651
|
document.getElementById('m3dCube').style.display=on?'block':'none';
|
|
8595
8652
|
document.getElementById('m3dAxes').style.display=on?'block':'none';
|
|
8596
8653
|
document.getElementById('ptrBars').classList.toggle('s3d',on); // in 3D the pointer-behaviour bars shift clear of the world-axis triad (bottom-right); see #ptrBars.s3d
|
|
8597
|
-
|
|
8654
|
+
reflectLegendPanel(); // entering/leaving 3D honours the persisted collapsed state and keeps its launcher in sync
|
|
8598
8655
|
}
|
|
8599
8656
|
let viewSeq=0; // monotonic per view switch — see the staleness check after the awaited rebuild below
|
|
8600
8657
|
async function setView(on){
|