Complete OKB structure view and paired card layout

This commit is contained in:
KrivovDE
2026-09-09 16:39:20 +03:00
parent 50cacb3293
commit 34d4ad979a
2 changed files with 20 additions and 7 deletions

View File

@@ -2257,7 +2257,9 @@ function fitStructure(){
if(!width||!height)return;
const fullCanvasStructure=document.body.classList.contains('saturn-structure-view')||document.body.classList.contains('okb-structure-view');
const canvasHeight=fullCanvasStructure?1080:972;
const availableHeight=Math.max(320,height-(fullCanvasStructure?0:40));
const structureFooter=document.querySelector('.structure-static-footer');
const footerHeight=structureFooter&&getComputedStyle(structureFooter).display!=='none'?structureFooter.offsetHeight:0;
const availableHeight=Math.max(320,height-footerHeight);
structureState.scale=clampStructureScale(Math.min(width/1920,availableHeight/canvasHeight));
structureState.x=(width-1920*structureState.scale)/2;
structureState.y=document.body.classList.contains('uaz-structure-view')