pub fn update_state(
        &self,
        state: &mut State,
        timer: &Snapshot<'_>,
        layout_settings: &GeneralLayoutSettings,
    ) {
        let mut draw_info = DrawInfo {
            flip_graph: self.settings.flip_graph,
            ..DrawInfo::default()
        };

        let x_axis = self
            .calculate_graph(timer, &mut draw_info)
            .unwrap_or(DEFAULT_X_AXIS);

        if draw_info.points.is_empty() {
            draw_info.points.push(Point {
                x: 0.0,
                y: DEFAULT_X_AXIS,
                is_best_segment: false,
            });
        }

        let grid_lines = calculate_grid_lines(&draw_info, x_axis);
        update_grid_line_vecs(state, grid_lines);
        self.copy_settings_to_state(state);
        state.best_segment_color = layout_settings.best_segment_color;
        state.middle = x_axis;
        state.is_live_delta_active = draw_info.is_live_delta_active;
        state.points = draw_info.points;
    }
/// Updates the component's state based on the timer and layout settings
/// provided.
Updates the component's state based on the timer and layout settings
provided.
Updates the component ' s state based on the timer and layout settings provided .
pub fn update_state(
        &self,
        state: &mut State,
        timer: &Snapshot<'_>,
        layout_settings: &GeneralLayoutSettings,
    ) {
        let mut draw_info = DrawInfo {
            flip_graph: self.settings.flip_graph,
            ..DrawInfo::default()
        };
        let x_axis = self
            .calculate_graph(timer, &mut draw_info)
            .unwrap_or(DEFAULT_X_AXIS);
        if draw_info.points.is_empty() {
            draw_info.points.push(Point {
                x: 0.0,
                y: DEFAULT_X_AXIS,
                is_best_segment: false,
            });
        }
        let grid_lines = calculate_grid_lines(&draw_info, x_axis);
        update_grid_line_vecs(state, grid_lines);
        self.copy_settings_to_state(state);
        state.best_segment_color = layout_settings.best_segment_color;
        state.middle = x_axis;
        state.is_live_delta_active = draw_info.is_live_delta_active;
        state.points = draw_info.points;
    }
pub fn update_state ( & self , state : & mut State , timer : & Snapshot < ' _ > , layout_settings : & GeneralLayoutSettings , ) { let mut draw_info = DrawInfo { flip_graph : self . settings . flip_graph , .. DrawInfo :: default ( ) } ; let x_axis = self . calculate_graph ( timer , & mut draw_info ) . unwrap_or ( DEFAULT_X_AXIS ) ; if draw_info . points . is_empty ( ) { draw_info . points . push ( Point { x : 0.0 , y : DEFAULT_X_AXIS , is_best_segment : false , } ) ; } let grid_lines = calculate_grid_lines ( & draw_info , x_axis ) ; update_grid_line_vecs ( state , grid_lines ) ; self . copy_settings_to_state ( state ) ; state . best_segment_color = layout_settings . best_segment_color ; state . middle = x_axis ; state . is_live_delta_active = draw_info . is_live_delta_active ; state . points = draw_info . points ; }
Updates the component's state based on the timer and layout settings
provided.
Updates the component ' s state based on the timer and layout settings provided .
&self
state
&mut State
timer
&Snapshot<'_>
layout_settings
&GeneralLayoutSettings
&self
state
&mut State
timer
&Snapshot<'_>
layout_settings
&GeneralLayoutSettings