Skip to content

Commit

Permalink
Start with menu collapsed on mobile (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Sep 18, 2024
1 parent b3eff19 commit 2b090f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/ui/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 0 additions & 6 deletions src/ui/scene-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
width: 320px;
}

@media (max-width: 600px) {
#scene-panel {
display: none;
}
}

.collapsed #scene-panel {
display: none;
}

0 comments on commit 2b090f5

Please sign in to comment.