MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / viewToggle

Function viewToggle

graph-ui/tools/smoke-w8b.mjs:227–247  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

225
226/** Der Ansichts-Umschalter: sein Rahmen, seine Rolle und was der aktive Chip sagt. */
227const viewToggle = (page) =>
228 page.evaluate(() => {
229 const group = document.querySelector('[data-testid="atlas-graph-mode"]');
230 if (group === null) {
231 return null;
232 }
233 const style = window.getComputedStyle(group);
234 const chips = [...group.querySelectorAll('[data-testid="atlas-graph-mode-chip"]')].map((chip) => ({
235 mode: chip.getAttribute('data-mode') ?? '',
236 pressed: chip.getAttribute('aria-pressed') ?? '',
237 active: chip.getAttribute('data-active') === 'true',
238 hint: chip.getAttribute('data-hint') ?? '',
239 disabled: chip.hasAttribute('disabled'),
240 }));
241 return {
242 role: group.getAttribute('role') ?? '',
243 borderWidth: Number.parseFloat(style.borderTopWidth) || 0,
244 borderStyle: style.borderTopStyle,
245 chips,
246 };
247 });
248
249/** Die vier Griffe, in Pixeln und mit ihrer Marke. */
250const handles = (page) =>

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected