getBoundingClientRectWithBorderOffset() — react Function Reference
Architecture documentation for the getBoundingClientRectWithBorderOffset() function in utils.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 477a1880_1870_436a_20a1_bbe65a72edff["getBoundingClientRectWithBorderOffset()"] 68d130b4_8767_c9b9_03b4_1510bf2fc934["utils.js"] 477a1880_1870_436a_20a1_bbe65a72edff -->|defined in| 68d130b4_8767_c9b9_03b4_1510bf2fc934 style 477a1880_1870_436a_20a1_bbe65a72edff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/backend/views/utils.js lines 41–58
export function getBoundingClientRectWithBorderOffset(node: HTMLElement): Rect {
const dimensions = getElementDimensions(node);
// $FlowFixMe[incompatible-variance]
return mergeRectOffsets([
node.getBoundingClientRect(),
{
top: dimensions.borderTop,
left: dimensions.borderLeft,
bottom: dimensions.borderBottom,
right: dimensions.borderRight,
// This width and height won't get used by mergeRectOffsets (since this
// is not the first rect in the array), but we set them so that this
// object type checks as a ClientRect.
width: 0,
height: 0,
},
]);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getBoundingClientRectWithBorderOffset() do?
getBoundingClientRectWithBorderOffset() is a function in the react codebase, defined in packages/react-devtools-shared/src/backend/views/utils.js.
Where is getBoundingClientRectWithBorderOffset() defined?
getBoundingClientRectWithBorderOffset() is defined in packages/react-devtools-shared/src/backend/views/utils.js at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free