MCPcopy
hub / github.com/KaTeX/KaTeX / syncOptionsPanelState

Function syncOptionsPanelState

static/main.js:138–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 }
137
138 function syncOptionsPanelState() {
139 const isCollapsed = optionsPanel.classList.contains("collapsed");
140
141 layout.classList.toggle("options-collapsed", isCollapsed);
142 toggleOptionsButton.setAttribute("aria-expanded", String(!isCollapsed));
143 toggleOptionsButton.setAttribute(
144 "aria-label",
145 isCollapsed ? "Show options" : "Hide options",
146 );
147 optionsResizer.setAttribute("aria-hidden", String(isCollapsed));
148 optionsResizer.tabIndex = isCollapsed ? -1 : 0;
149 syncSidebarWidthMode();
150 }
151
152 function syncSidebarWidthMode() {
153 const isMobile = isMobileViewport();

Callers 2

toggleOptionsPanelFunction · 0.85
initFunction · 0.85

Calls 2

syncSidebarWidthModeFunction · 0.85
setAttributeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…