From 4d8a459a86a4a55bbbc35a0ec08e790d019e6e0a Mon Sep 17 00:00:00 2001 From: kovacsv Date: Fri, 17 Dec 2021 19:09:32 +0100 Subject: [PATCH] Fix resize in case of silly zooms. --- website/o3dv/js/website.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/o3dv/js/website.js b/website/o3dv/js/website.js index 92cdcb79..f6b986f6 100644 --- a/website/o3dv/js/website.js +++ b/website/o3dv/js/website.js @@ -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; @@ -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 ()