From 78da77f7103c81fa45f10fbb21d945317a7f8d91 Mon Sep 17 00:00:00 2001 From: Demetri Pirpiris Date: Sat, 15 Mar 2025 14:35:09 -0600 Subject: [PATCH] have windows properly initialized on mobile --- script.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/script.js b/script.js index ebf4b55..0f0be33 100644 --- a/script.js +++ b/script.js @@ -203,6 +203,16 @@ function removeDraggable(panel) { attachWorldSubTabLogic(clone); wireUIEvents(); + +// If this is the controlPanel AND we are in mobile, minimize again +if (isMobileLayout && clone.id === 'controlPanel') { + const cContent = clone.querySelector('.content'); + const cMinBtn = clone.querySelector('.minimize'); + if (cContent && cMinBtn) { + cContent.style.display = 'none'; + cMinBtn.textContent = '+'; + } + } } function attachMinimizeLogic(panel) {