MCPcopy Create free account
hub / github.com/KaTeX/KaTeX / syncSidebarWidthMode

Function syncSidebarWidthMode

static/main.js:152–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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");

Callers 3

setSidebarWidthFunction · 0.85
setMobileOptionsHeightFunction · 0.85
syncOptionsPanelStateFunction · 0.85

Calls 3

isMobileViewportFunction · 0.85
getCurrentSidebarWidthFunction · 0.85
setAttributeMethod · 0.45

Tested by

no test coverage detected