()
| 150 | } |
| 151 | |
| 152 | function syncSidebarWidthMode() { |
| 153 | const isMobile = isMobileViewport(); |
| 154 | const isCollapsed = optionsPanel.classList.contains("collapsed"); |
| 155 | const isNarrow = getCurrentSidebarWidth() < narrowSidebarWidth; |
| 156 | |
| 157 | optionsResizer.setAttribute( |
| 158 | "aria-orientation", |
| 159 | isMobile ? "horizontal" : "vertical", |
| 160 | ); |
| 161 | |
| 162 | layout.classList.toggle( |
| 163 | "sidebar-narrow", |
| 164 | !isMobile && !isCollapsed && isNarrow, |
| 165 | ); |
| 166 | } |
| 167 | |
| 168 | function toggleOptionsPanel() { |
| 169 | optionsPanel.classList.toggle("collapsed"); |
no test coverage detected