From 94617a2ed8314a12d239a735e3b3cef306887e55 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Thu, 1 Jan 2026 16:01:07 +0100 Subject: fill space --- webAO/ui.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'webAO') diff --git a/webAO/ui.js b/webAO/ui.js index 8520c12..cdabd70 100644 --- a/webAO/ui.js +++ b/webAO/ui.js @@ -203,8 +203,6 @@ if (isMobileDevice) { golden.loadLayout(config); } -console.log(golden.root.contentItems[0].contentItems[0].contentItems[0]); - function adjustSplitter() { if (isMobileDevice) return; // Skip for mobile layout const column = golden.root.contentItems[0].contentItems[0]; @@ -222,17 +220,9 @@ function adjustSplitter() { const percentage = Math.min(90, Math.max(10, (totalHeight / columnHeight) * 100)); icItem.element.style.height = `${totalHeight}px`; icOptionsItem.element.style.height = `calc(100% - ${totalHeight}px)`; - - // Safely access nested child elements with proper checks - if (icOptionsItem && icOptionsItem.child && icOptionsItem.child[1]) { - icOptionsItem.child[1].element.style.height = `100%`; - if (icOptionsItem.child[1].child && icOptionsItem.child[1].child[0]) { - icOptionsItem.child[1].child[0].element.style.height = `100%`; - if (icOptionsItem.child[1].child[0].child && icOptionsItem.child[1].child[0].child[0]) { - icOptionsItem.child[1].child[0].child[0].element.style.height = `100%`; - } - } - } + icOptionsItem.element.children[1].style.height = `100%`; + icOptionsItem.element.children[1].children[0].style.height = `100%`; + icOptionsItem.element.children[1].children[0].children[0].style.height = `100%`; } window.addEventListener('resize', () => setTimeout(adjustSplitter, 100)); -- cgit