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

Function labelOverlaps

graph-ui/tools/call-feedback-acceptance.mjs:507–521  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

505/* Architektur */
506
507async function labelOverlaps(page) {
508 return page.evaluate(() => {
509 const boxes = [...document.querySelectorAll('button.architecture-node-label')]
510 .filter((el) => !el.classList.contains('is-hidden') && el.offsetParent !== null)
511 .map((el) => ({ r: el.getBoundingClientRect(), text: el.textContent?.trim() ?? '' }))
512 .filter((item) => item.r.width > 0 && item.r.height > 0);
513 let overlaps = 0;
514 for (let i = 0; i < boxes.length; i += 1) for (let j = i + 1; j < boxes.length; j += 1) {
515 // Gemessen am Textbereich, ohne den Innenabstand des Etiketts: so entscheidet auch die Szene.
516 const a = boxes[i].r; const b = boxes[j].r; const ix = 6; const iy = 4;
517 if (!(a.left + ix >= b.right - ix || b.left + ix >= a.right - ix || a.top + iy >= b.bottom - iy || b.top + iy >= a.bottom - iy)) overlaps += 1;
518 }
519 return { labels: boxes.length, overlaps, sample: boxes.slice(0, 12).map((item) => item.text) };
520 });
521}
522
523async function architectureChecks(page) {
524 const view = (name) => page.locator(`button.atlas-arch-tab[data-view="${name}"]`).first();

Callers 1

architectureChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected