MCPcopy
hub / github.com/nilbuild/driver.js / getPopoverDimensions

Function getPopoverDimensions

src/position.ts:18–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16};
17
18function getPopoverDimensions(): PopoverDimensions | undefined {
19 const popover = getState("popover");
20 if (!popover?.wrapper) {
21 return;
22 }
23
24 const boundingClientRect = popover.wrapper.getBoundingClientRect();
25
26 const stagePadding = getConfig("stagePadding") || 0;
27 const popoverOffset = getConfig("popoverOffset") || 0;
28
29 return {
30 width: boundingClientRect.width + stagePadding + popoverOffset,
31 height: boundingClientRect.height + stagePadding + popoverOffset,
32
33 realWidth: boundingClientRect.width,
34 realHeight: boundingClientRect.height,
35 };
36}
37
38function calculateTopForLeftRight(
39 alignment: Alignment,

Callers 1

repositionPopoverFunction · 0.85

Calls 2

getStateFunction · 0.90
getConfigFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…