feat(fence): add height selection for fence panels and update related logic
continuous-integration/drone/push Build is passing

- Introduced a new section in the UI for selecting fence heights, visible only when the fence option is enabled.
- Updated the fence label to clarify the presence of gates.
- Enhanced the JavaScript logic to manage the visibility of fence heights based on user selection.
- Modified the fence rendering logic to accommodate different heights and ensure proper visibility based on the selected height.
- Updated CSS to style the new fence height controls appropriately.
- Adjusted the model configuration to reflect changes in the fence height options.
This commit is contained in:
martin.fencl
2026-10-26 21:24:38 +01:00
parent 2bc9be73f3
commit c32d1e5a04
7 changed files with 164 additions and 77 deletions
+11 -3
View File
@@ -11,7 +11,7 @@
<link rel="stylesheet" href="./css/app.css">
<link rel="stylesheet" href="./css/web.css">
<link rel="stylesheet" href="./css/web.css?v=20261026">
<meta name="robots" content="noindex,nofollow">
</head>
@@ -141,7 +141,7 @@
id="siteParcel" autocomplete="off" checked><span>Celý pozemek</span></label>
<label class="site-switch" title="Parkovací plocha, napojení a schody; dvě orientační auta"><input
type="checkbox" id="siteParking" autocomplete="off" checked><span>Parkování</span></label>
<label class="site-switch" title="Plot z 3D panelů na podhrabových deskách; u příjezdu brána a branka"><input
<label class="site-switch" title="Plot z 3D panelů na podhrabových deskách; u domu branka a brána pro auta"><input
type="checkbox" id="siteFence" autocomplete="off"><span>Plot</span></label>
<button id="siteFit" class="site-fit" type="button" title="Zarámovat zapnuté okolí"
aria-label="Zarámovat zapnuté okolí"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
@@ -150,6 +150,14 @@
<rect x="9" y="9" width="6" height="6" rx="1" />
</svg></button>
</div>
<div id="fenceHeights" class="site-controls fence-heights" role="group" aria-label="Výška plotu" hidden>
<span class="fence-heights-label">Výška plotu</span>
<button type="button" class="site-switch" data-fence-height="0" title="Panel 830 mm na podhrabové desce 200 mm">1,0 m</button>
<button type="button" class="site-switch" data-fence-height="1" title="Panel 1030 mm na podhrabové desce 200 mm">1,2 m</button>
<button type="button" class="site-switch" data-fence-height="2" title="Panel 1230 mm na podhrabové desce 200 mm">1,4 m</button>
<button type="button" class="site-switch" data-fence-height="3" title="Panel 1530 mm na podhrabové desce 200 mm">1,7 m</button>
<button type="button" class="site-switch" data-fence-height="4" title="Panel 1730 mm na podhrabové desce 200 mm; nejvyšší vyráběná kombinace do 2 m">1,9 m</button>
</div>
<div id="siteMeta" hidden aria-live="polite"></div>
<div class="help">Ta&#382;en&#237;m ot&#225;&#269;ej &nbsp;&middot;&nbsp; Kole&#269;kem p&#345;ibli&#382;
&nbsp;&middot;&nbsp; Prav&#253;m tla&#269;&#237;tkem posu&#328;</div>
@@ -347,7 +355,7 @@
<script>
// Firefox and Safari accept an import map only before the first module starts loading, so the map
// for Three.js is added here and bootstrap.js is requested only afterwards.
fetch('./data/app-config.json',{cache:'no-cache'}).then(r=>r.json()).then(c=>{const m=document.createElement('script');m.type='importmap';m.textContent=JSON.stringify({imports:{three:new URL(c.threeModule,location.href).href}});document.head.appendChild(m);}).catch(()=>{}).finally(()=>{const s=document.createElement('script');s.type='module';s.src='./js/bootstrap.js?v=20261026';document.body.appendChild(s);});
fetch('./data/app-config.json',{cache:'no-cache'}).then(r=>r.json()).then(c=>{const m=document.createElement('script');m.type='importmap';m.textContent=JSON.stringify({imports:{three:new URL(c.threeModule,location.href).href}});document.head.appendChild(m);}).catch(()=>{}).finally(()=>{const s=document.createElement('script');s.type='module';s.src='./js/bootstrap.js?v=20261026e';document.body.appendChild(s);});
</script>
</body>