Skip to main content

hover_progress

Function hover_progress 

Source
pub fn hover_progress(window: &mut Window, cx: &mut App) -> f32
Expand description

How far the enclosing plot’s hover has faded in this frame, from 0 to 1; see PlotHover::progress.

For an overlay a plot returns from Plot::tooltip, which renders within the plot’s element scope and fades with its hover without being handed the progress.

This reads the hover the enclosing PlotElement tracked in its element scope, so it is only meaningful while that plot is rendering its overlay. Anywhere else it reads no tracked hover and returns 1.