intersectionOfRects() — react Function Reference
Architecture documentation for the intersectionOfRects() function in geometry.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9ca9174f_303e_0f6b_0371_0eaf35e67cb8["intersectionOfRects()"] 1d481b0c_03e1_6f28_eff1_74d4566b3dc8["geometry.js"] 9ca9174f_303e_0f6b_0371_0eaf35e67cb8 -->|defined in| 1d481b0c_03e1_6f28_eff1_74d4566b3dc8 0d243608_f488_b170_3ab3_3c4450110021["rectToBox()"] 9ca9174f_303e_0f6b_0371_0eaf35e67cb8 -->|calls| 0d243608_f488_b170_3ab3_3c4450110021 ee75b67e_5a11_9c92_ca64_32a3289b3e68["boxToRect()"] 9ca9174f_303e_0f6b_0371_0eaf35e67cb8 -->|calls| ee75b67e_5a11_9c92_ca64_32a3289b3e68 style 9ca9174f_303e_0f6b_0371_0eaf35e67cb8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-timeline/src/view-base/geometry.js lines 107–116
export function intersectionOfRects(rect1: Rect, rect2: Rect): Rect {
const [top1, right1, bottom1, left1] = rectToBox(rect1);
const [top2, right2, bottom2, left2] = rectToBox(rect2);
return boxToRect([
Math.max(top1, top2),
Math.min(right1, right2),
Math.min(bottom1, bottom2),
Math.max(left1, left2),
]);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does intersectionOfRects() do?
intersectionOfRects() is a function in the react codebase, defined in packages/react-devtools-timeline/src/view-base/geometry.js.
Where is intersectionOfRects() defined?
intersectionOfRects() is defined in packages/react-devtools-timeline/src/view-base/geometry.js at line 107.
What does intersectionOfRects() call?
intersectionOfRects() calls 2 function(s): boxToRect, rectToBox.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free