MCPcopy Create free account
hub / github.com/Lobos/react-ui / offset

Function offset

src/utils/dom.js:24–30  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

22}
23
24export function offset (el) {
25 const rect = el.getBoundingClientRect();
26 return {
27 top: rect.top + document.body.scrollTop,
28 left: rect.left + document.body.scrollLeft
29 };
30}
31
32export function forceRedraw (el) {
33 let originalDisplay = el.style.display;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…