File tree Expand file tree Collapse file tree
Lib/profiling/sampling/_heatmap_assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ function buildScrollMarker() {
177177
178178 if ( document . body . scrollHeight <= window . innerHeight ) return ;
179179
180- const lines = document . querySelectorAll ( '.code-line' ) ;
180+ const allLines = document . querySelectorAll ( '.code-line' ) ;
181+ const lines = Array . from ( allLines ) . filter ( line => line . style . display !== 'none' ) ;
181182 const markerScale = window . innerHeight / document . body . scrollHeight ;
182183 const lineHeight = Math . min ( Math . max ( 3 , window . innerHeight / lines . length ) , 10 ) ;
183184 const maxSamples = Math . max ( ...Array . from ( lines , getSampleCount ) ) ;
@@ -236,6 +237,7 @@ function toggleColdCode() {
236237 coldCodeHidden = ! coldCodeHidden ;
237238 applyHotFilter ( ) ;
238239 updateToggleUI ( 'toggle-cold' , coldCodeHidden ) ;
240+ buildScrollMarker ( ) ;
239241}
240242
241243function applyHotFilter ( ) {
You can’t perform that action at this time.
0 commit comments