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

Function lineRects

graph-ui/tools/lib/readability.mjs:442–453  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

440
441 /** Die Rechtecke der einzelnen Zeilen des eigenen Textes eines Elements. */
442 const lineRects = (node) => {
443 const rects = [];
444 const range = document.createRange();
445 for (const child of node.childNodes) {
446 if (child.nodeType !== Node.TEXT_NODE || (child.nodeValue ?? '').trim().length === 0) {
447 continue;
448 }
449 range.selectNodeContents(child);
450 rects.push(...range.getClientRects());
451 }
452 return rects;
453 };
454
455 // ------------------------------------------------------- (b) Beschneidung
456 const clipped = [];

Callers 1

PROBEFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected