Skip to main content

scroll_to

Function scroll_to 

Source
pub fn scroll_to(ident: impl Into<Ident>, offset: Point<Pixels>, cx: &mut App)
Expand description

Puts the region with this identity at offset, measured the same way scroll_offset reports it.

The counterpart to reading, for a host restoring where the user was: a reopened document belongs where they left it, not at the top. It takes effect on the next frame, and a region that has never rendered remembers the position until it does.