calculateInitialScrollOffset() — react Function Reference
Architecture documentation for the calculateInitialScrollOffset() function in Tree.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 078bd51f_6be5_7560_d1ad_d8f38bacfb55["calculateInitialScrollOffset()"] 80ad5569_a221_98e5_daec_ede1bea33ee0["Tree.js"] 078bd51f_6be5_7560_d1ad_d8f38bacfb55 -->|defined in| 80ad5569_a221_98e5_daec_ede1bea33ee0 8903e7f2_b245_fcae_5413_05a60dcaa5e4["Tree()"] 8903e7f2_b245_fcae_5413_05a60dcaa5e4 -->|calls| 078bd51f_6be5_7560_d1ad_d8f38bacfb55 style 078bd51f_6be5_7560_d1ad_d8f38bacfb55 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/devtools/views/Components/Tree.js lines 60–74
function calculateInitialScrollOffset(
inspectedElementIndex: number | null,
elementHeight: number,
): number | void {
if (inspectedElementIndex === null) {
return undefined;
}
if (inspectedElementIndex < 3) {
return undefined;
}
// Make 3 elements on top of the inspected one visible
return (inspectedElementIndex - 3) * elementHeight;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does calculateInitialScrollOffset() do?
calculateInitialScrollOffset() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Components/Tree.js.
Where is calculateInitialScrollOffset() defined?
calculateInitialScrollOffset() is defined in packages/react-devtools-shared/src/devtools/views/Components/Tree.js at line 60.
What calls calculateInitialScrollOffset()?
calculateInitialScrollOffset() is called by 1 function(s): Tree.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free