diff --git a/website/o3dv/css/panelset.css b/website/o3dv/css/panelset.css index 216a312..20ed184 100644 --- a/website/o3dv/css/panelset.css +++ b/website/o3dv/css/panelset.css @@ -10,7 +10,7 @@ div.ov_panel_set_right_container div.ov_panel_set_menu div.ov_panel_set_menu div.ov_panel_set_menu_button { - padding: 6px; + padding: 10px; cursor: pointer; } diff --git a/website/o3dv/js/navigator.js b/website/o3dv/js/navigator.js index 0238895..134c248 100644 --- a/website/o3dv/js/navigator.js +++ b/website/o3dv/js/navigator.js @@ -58,6 +58,9 @@ OV.Navigator = class this.callbacks = callbacks; this.panelSet.Init ({ + onShowHidePanels : (show) => { + + }, onResize : () => { if (this.panelSet.IsPanelsVisible ()) { this.splitterDiv.show (); diff --git a/website/o3dv/js/panelset.js b/website/o3dv/js/panelset.js index 88deb3d..46605ab 100644 --- a/website/o3dv/js/panelset.js +++ b/website/o3dv/js/panelset.js @@ -101,13 +101,14 @@ OV.PanelSet = class if (this.panelsVisible) { this.contentDiv.show (); this.parentDiv.outerWidth (this.menuDiv.outerWidth (true) + this.panelsPrevWidth, true); - this.callbacks.onResize (); } else { this.panelsPrevWidth = this.contentDiv.outerWidth (true); - this.contentDiv.hide (); this.parentDiv.outerWidth (this.menuDiv.outerWidth (true), true); - this.callbacks.onResize (); + this.contentDiv.hide (); } + + this.callbacks.onShowHidePanels (this.panelsVisible); + this.callbacks.onResize (); } ShowPanel (panel) diff --git a/website/o3dv/js/sidebar.js b/website/o3dv/js/sidebar.js index 35778ee..795ae9b 100644 --- a/website/o3dv/js/sidebar.js +++ b/website/o3dv/js/sidebar.js @@ -13,11 +13,24 @@ OV.Sidebar = class this.panelSet.ShowPanel (this.detailsPanel); } + IsPanelsVisible () + { + return this.panelSet.IsPanelsVisible (); + } + + ShowPanels (show) + { + this.panelSet.ShowPanels (show); + } + Init (settings, callbacks) { this.callbacks = callbacks; this.panelSet.Init ({ + onShowHidePanels : (show) => { + this.callbacks.onShowHidePanels (show); + }, onResize : () => { if (this.panelSet.IsPanelsVisible ()) { //this.splitterDiv.show (); diff --git a/website/o3dv/js/website.js b/website/o3dv/js/website.js index 168bb7c..00aed13 100644 --- a/website/o3dv/js/website.js +++ b/website/o3dv/js/website.js @@ -58,15 +58,13 @@ 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; } - let contentWidth = windowWidth - navigatorWidth - sidebarWidth - safetyMargin; - let contentHeight = windowHeight - headerHeight - safetyMargin; + let contentWidth = windowWidth - navigatorWidth - sidebarWidth; + let contentHeight = windowHeight - headerHeight; this.parameters.sidebarDiv.outerHeight (contentHeight, true); this.parameters.introDiv.outerHeight (contentHeight, true); @@ -510,9 +508,6 @@ OV.Website = class { this.sidebar.Init (this.settings, { - onResize : () => { - this.Resize (); - }, onBackgroundColorChange : (newVal) => { this.settings.backgroundColor = newVal; this.settings.SaveToCookies (this.cookieHandler); @@ -529,6 +524,12 @@ OV.Website = class }, onThemeChange : (newVal) => { this.SwitchTheme (newVal, true); + }, + onResize : () => { + this.Resize (); + }, + onShowHidePanels : (show) => { + } } );