Programmatic scrolling

It seems that programmatically scrolling a Scrollable widget was discussed here, and resulted in scroll_to and snap_to.

Unfortunately, this doesn’t cover my use-case, which is essentially loading a document and then scrolling to a certain section which is often in the middle of the document. There’s no obvious way to do this with scroll_to.

Now, I was able to implement this, with some ugly hacks, i.e. calculate each section’s position in the scrollable (with Paragraph::min_height() to get height of each widget) and some mutable global state to keep track of the whole thing, but it would be nice to have the Anchor feature described in that issue above.

Is this feature already in Iced, and did I just miss it? Or is an Anchor something that might be added to Iced? I can open an issue to discuss it if that’s the case.