File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
packages/react-devtools-scheduling-profiler/src/content-views Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -195,13 +195,17 @@ class FlamechartStackLayerView extends View {
195195 const flamechartStackFrame = _stackLayer [ currentIndex ] ;
196196 const { timestamp, duration} = flamechartStackFrame ;
197197
198- const width = durationToWidth ( duration , scaleFactor ) ;
199198 const x = Math . floor ( timestampToPosition ( timestamp , scaleFactor , frame ) ) ;
200- if ( x <= location . x && x + width >= location . x ) {
201- this . currentCursor = 'context-menu' ;
202- viewRefs . hoveredView = this ;
203- _onHover ( flamechartStackFrame ) ;
204- return ;
199+ const width = durationToWidth ( duration , scaleFactor ) ;
200+
201+ // Don't show tooltips for nodes that are too small to render at this zoom level.
202+ if ( Math . floor ( width - BORDER_SIZE ) >= 1 ) {
203+ if ( x <= location . x && x + width >= location . x ) {
204+ this . currentCursor = 'context-menu' ;
205+ viewRefs . hoveredView = this ;
206+ _onHover ( flamechartStackFrame ) ;
207+ return ;
208+ }
205209 }
206210
207211 if ( x > location . x ) {
You can’t perform that action at this time.
0 commit comments