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

Function reposition

graph-ui/src/projects/ProjectSwitcher.tsx:34–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 useLayoutEffect(() => {
33 if (!open) return;
34 const reposition = (): void => {
35 const bounds = trigger.current?.getBoundingClientRect();
36 if (bounds) setPlacement(projectPickerPlacement(bounds, { width: window.innerWidth, height: window.innerHeight }));
37 };
38 reposition();
39 const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(reposition);
40 const header = disclosure.current?.closest('.atlas-header') ?? trigger.current;

Callers 1

ProjectSwitcherFunction · 0.85

Calls 1

projectPickerPlacementFunction · 0.90

Tested by

no test coverage detected