_updateHover() — react Function Reference
Architecture documentation for the _updateHover() function in SnapshotsView.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 64022f73_edf0_3924_f2bc_fa1721df6b4c["_updateHover()"] b81cc0fe_3212_0d53_b9ee_a5cdac317703["SnapshotsView"] 64022f73_edf0_3924_f2bc_fa1721df6b4c -->|defined in| b81cc0fe_3212_0d53_b9ee_a5cdac317703 f75a6f80_b8f0_37ec_85f5_4d1bc669b749["handleInteraction()"] f75a6f80_b8f0_37ec_85f5_4d1bc669b749 -->|calls| 64022f73_edf0_3924_f2bc_fa1721df6b4c 163e5c39_dcbb_032a_57e9_b189e6dff0f8["_findClosestSnapshot()"] 64022f73_edf0_3924_f2bc_fa1721df6b4c -->|calls| 163e5c39_dcbb_032a_57e9_b189e6dff0f8 style 64022f73_edf0_3924_f2bc_fa1721df6b4c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-timeline/src/content-views/SnapshotsView.js lines 228–259
_updateHover(location: Point, viewRefs: ViewRefs) {
const {onHover, visibleArea} = this;
if (!onHover) {
return;
}
if (!rectContainsPoint(location, visibleArea)) {
if (this._hoverLocation !== null) {
this._hoverLocation = null;
this.setNeedsDisplay();
}
onHover(null);
return;
}
const snapshot = this._findClosestSnapshot(location.x);
if (snapshot !== null) {
this._hoverLocation = location;
onHover(snapshot);
} else {
this._hoverLocation = null;
onHover(null);
}
// Any time the mouse moves within the boundaries of this view, we need to re-render.
// This is because we draw a scrubbing bar that shows the location corresponding to the current tooltip.
this.setNeedsDisplay();
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _updateHover() do?
_updateHover() is a function in the react codebase, defined in packages/react-devtools-timeline/src/content-views/SnapshotsView.js.
Where is _updateHover() defined?
_updateHover() is defined in packages/react-devtools-timeline/src/content-views/SnapshotsView.js at line 228.
What does _updateHover() call?
_updateHover() calls 1 function(s): _findClosestSnapshot.
What calls _updateHover()?
_updateHover() is called by 1 function(s): handleInteraction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free