Implement list scroll tracking
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
1d34b7b9fe
commit
742180a3a8
3 changed files with 75 additions and 29 deletions
|
@ -900,6 +900,12 @@ impl InteractiveElementState {
|
|||
.as_ref()
|
||||
.map(|offset| offset.lock().clone())
|
||||
}
|
||||
|
||||
pub fn track_scroll_offset(&mut self) -> Arc<Mutex<Point<Pixels>>> {
|
||||
self.scroll_offset
|
||||
.get_or_insert_with(|| Arc::new(Mutex::new(Default::default())))
|
||||
.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl<V> Default for StatelessInteractivity<V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue