Skip to content

Commit

Permalink
Fix resize in case of silly zooms.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Dec 17, 2021
1 parent aec0d4a commit 4d8a459
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/o3dv/js/website.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ OV.Website = class

let navigatorWidth = 0;
let sidebarWidth = 0;
let safetyMargin = 0;
if (!OV.IsSmallWidth ()) {
navigatorWidth = this.navigator.GetWidth ();
sidebarWidth = this.sidebar.GetWidth ();
safetyMargin = 1;
}

const minContentWidth = 50;
Expand All @@ -81,10 +83,11 @@ OV.Website = class
}
let contentHeight = windowHeight - headerHeight;

console.log (contentWidth);
OV.SetDomElementOuterHeight (this.parameters.introDiv, contentHeight);
this.navigator.Resize (contentHeight);
this.sidebar.Resize (contentHeight);
this.viewer.Resize (contentWidth, contentHeight);
this.viewer.Resize (contentWidth - safetyMargin, contentHeight);
}

OnSmallWidthChanged ()
Expand Down

0 comments on commit 4d8a459

Please sign in to comment.