Guide API
Skip to main content

ov_update

Function ov_update 

Source
pub fn ov_update<L: OutlineViewer + ?Sized>(this: &mut L, ctx: &mut Context<'_>)
Expand description

Recount the visible nodes, republish the scrollbar limits, and re-clamp the focus.

This is invoked automatically on first display or interaction via ensure_seeded, so you only need to call it explicitly after mutating the tree (node inserted, removed, or expanded/collapsed programmatically).

Internally this counts only the currently-visible nodes (collapsed subtrees are excluded), computes the maximum row width, calls OutlineViewerState::set_limit to publish those extents to the scrollbars, and then calls adjust_focus to re-clamp foc within the new count.