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

Function protectedRects

graph-ui/src/ui/tooltip/Hint.tsx:135–152  ·  view source on GitHub ↗

Die Rechtecke, die an dieser Stelle nicht verdeckt werden duerfen.

(anchor: Element)

Source from the content-addressed store, hash-verified

133
134/** Die Rechtecke, die an dieser Stelle nicht verdeckt werden duerfen. */
135function protectedRects(anchor: Element): HintRect[] {
136 const out: HintRect[] = [];
137 for (const node of document.querySelectorAll(HINT_PROTECTED_SELECTOR)) {
138 if (node === anchor || !rendered(node)) {
139 continue;
140 }
141 const style = window.getComputedStyle(node);
142 if (style.display === 'none' || style.visibility === 'hidden') {
143 continue;
144 }
145 const rect = node.getBoundingClientRect();
146 if (rect.width <= 0 || rect.height <= 0) {
147 continue;
148 }
149 out.push({ x: rect.left, y: rect.top, width: rect.width, height: rect.height });
150 }
151 return out;
152}
153
154/** Zwei Rueckrufe hintereinander, wo der Ausloeser schon einen hatte. */
155function both<T>(first: ((value: T) => void) | undefined, second: (value: T) => void) {

Callers 1

HintFunction · 0.85

Calls 2

renderedFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected