Skip to main content

apply_scroll

Function apply_scroll 

Source
pub fn apply_scroll(node: &mut LayoutNode, offsets: &mut HashMap<ScrollId, f64>)
Expand description

Apply scroll offsets to a laid-out tree: for each scroll container, clamp its stored offset to the content overflow and shift its descendants up by that amount (so the offset is the source of truth, re-applied each frame). Returns nothing; clamps offsets in place so the app keeps valid values.