setScrollState() — react Function Reference
Architecture documentation for the setScrollState() function in HorizontalPanAndZoomView.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a56c87e4_5abf_4094_4e1a_cc6225040263["setScrollState()"] 286a732c_79f8_d4a2_284e_8f3ea43c6d7d["HorizontalPanAndZoomView"] a56c87e4_5abf_4094_4e1a_cc6225040263 -->|defined in| 286a732c_79f8_d4a2_284e_8f3ea43c6d7d 3fecd1d6_3b0e_08d7_18fe_cef444b6228a["zoomToRange()"] 3fecd1d6_3b0e_08d7_18fe_cef444b6228a -->|calls| a56c87e4_5abf_4094_4e1a_cc6225040263 f077803e_adfb_e522_43d4_7b720fa272fa["clampState()"] a56c87e4_5abf_4094_4e1a_cc6225040263 -->|calls| f077803e_adfb_e522_43d4_7b720fa272fa 7d8994ae_c610_bfe7_54d3_0ee2e2bf3ec1["areScrollStatesEqual()"] a56c87e4_5abf_4094_4e1a_cc6225040263 -->|calls| 7d8994ae_c610_bfe7_54d3_0ee2e2bf3ec1 style a56c87e4_5abf_4094_4e1a_cc6225040263 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-timeline/src/view-base/HorizontalPanAndZoomView.js lines 72–84
setScrollState(proposedState: ScrollState) {
const clampedState = clampState({
state: proposedState,
minContentLength: this._intrinsicContentWidth * MIN_ZOOM_LEVEL,
maxContentLength: this._intrinsicContentWidth * MAX_ZOOM_LEVEL,
containerLength: this.frame.size.width,
});
if (
!areScrollStatesEqual(clampedState, this._viewState.horizontalScrollState)
) {
this.setNeedsDisplay();
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does setScrollState() do?
setScrollState() is a function in the react codebase, defined in packages/react-devtools-timeline/src/view-base/HorizontalPanAndZoomView.js.
Where is setScrollState() defined?
setScrollState() is defined in packages/react-devtools-timeline/src/view-base/HorizontalPanAndZoomView.js at line 72.
What does setScrollState() call?
setScrollState() calls 2 function(s): areScrollStatesEqual, clampState.
What calls setScrollState()?
setScrollState() is called by 1 function(s): zoomToRange.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free