have windows properly initialized on mobile

This commit is contained in:
Demetri Pirpiris 2025-03-15 14:35:09 -06:00
parent 2d3969d160
commit 78da77f710
1 changed files with 10 additions and 0 deletions

View File

@ -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) {