use DragEvent not MouseEvent for drag events (#3137)
* use DragEvent not MouseEvent for drag events * Simplify drag events and remove WebDragData struct * use DragEvent not MouseEvent for drag events * re-add the web_sys event reference for drag + mouse data * remove now vestigial impls for MouseEvent --------- Co-authored-by: Matt Hunzinger <matthunz2@gmail.com>
This commit is contained in:
1 parent
5d99889728
commit
e5a1a62644
18 files changed
+83
-94
No files matched your search
@@ -5,7 +5,7 @@ use dioxus_html::{
|
||||
InteractionElementOffset, InteractionLocation, Modifiers, ModifiersInteraction,
|
||||
PointerInteraction,
|
||||
},
|
||||
HasDragData, HasFileData, HasMouseData,
|
||||
HasMouseData,
|
||||
};
|
||||
use web_sys::MouseEvent;
|
||||
|
||||
@@ -64,15 +64,7 @@ impl PointerInteraction for Synthetic<MouseEvent> {
|
||||
|
||||
impl HasMouseData for Synthetic<MouseEvent> {
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl HasFileData for Synthetic<MouseEvent> {}
|
||||
|
||||
impl HasDragData for Synthetic<MouseEvent> {
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
self
|
||||
&self.event
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user