diff --git a/src/ui/menu.ts b/src/ui/menu.ts index b60ef8d..28805e3 100644 --- a/src/ui/menu.ts +++ b/src/ui/menu.ts @@ -72,6 +72,11 @@ class Menu extends Container { }; + // collapse menu on mobile + if (document.body.clientWidth < 600) { + toggleCollapsed(); + } + const collapse = createSvg(collapseSvg); collapse.dom.classList.add('menu-icon'); collapse.dom.setAttribute('id', 'menu-collapse'); diff --git a/src/ui/scene-panel.scss b/src/ui/scene-panel.scss index 80d7119..727a595 100644 --- a/src/ui/scene-panel.scss +++ b/src/ui/scene-panel.scss @@ -4,12 +4,6 @@ width: 320px; } -@media (max-width: 600px) { - #scene-panel { - display: none; - } -} - .collapsed #scene-panel { display: none; } \ No newline at end of file