Add new drag API

This commit is contained in:
Mikayla
2023-12-13 13:40:19 -08:00
parent bfbbec0b01
commit a807e798ec
8 changed files with 119 additions and 96 deletions
+4
View File
@@ -1138,6 +1138,10 @@ impl AppContext {
pub fn has_active_drag(&self) -> bool {
self.active_drag.is_some()
}
pub fn active_drag(&self) -> Option<AnyView> {
self.active_drag.as_ref().map(|drag| drag.view.clone())
}
}
impl Context for AppContext {