From c6398212494cb44cd46be68033b43de409898749 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Mon, 1 Nov 2021 07:48:02 +0100 Subject: [PATCH] Fix splitter behavior. --- website/o3dv/js/website.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/website/o3dv/js/website.js b/website/o3dv/js/website.js index 538f0d0..3f13209 100644 --- a/website/o3dv/js/website.js +++ b/website/o3dv/js/website.js @@ -689,9 +689,13 @@ OV.Website = class navigatorOriginalWidth = this.parameters.navigatorDiv.outerWidth (true); }, onSplit : (xDiff) => { - const newWidth = navigatorOriginalWidth + xDiff; - if (newWidth < 250 || newWidth > 450) { - return; + const minWidth = 250; + const maxWidth = 450; + let newWidth = navigatorOriginalWidth + xDiff; + if (newWidth < minWidth) { + newWidth = minWidth; + } else if (newWidth > maxWidth) { + newWidth = maxWidth; } this.parameters.navigatorDiv.outerWidth (newWidth, true); this.Resize ();