fix drag* events
This commit is contained in:
1 parent
faf94c7b4e
commit
8a1f54f573
2 files changed
+15
-3
No files matched your search
@@ -4,6 +4,7 @@ use crate::events::{
|
||||
};
|
||||
use crate::geometry::{ClientPoint, Coordinates, ElementPoint, PagePoint, ScreenPoint};
|
||||
use crate::input_data::{decode_key_location, decode_mouse_button_set, MouseButton};
|
||||
use crate::DragData;
|
||||
use keyboard_types::{Code, Key, Modifiers};
|
||||
use std::convert::TryInto;
|
||||
use std::str::FromStr;
|
||||
@@ -40,6 +41,7 @@ uncheck_convert![
|
||||
CompositionEvent => CompositionData,
|
||||
KeyboardEvent => KeyboardData,
|
||||
MouseEvent => MouseData,
|
||||
MouseEvent => DragData,
|
||||
TouchEvent => TouchData,
|
||||
PointerEvent => PointerData,
|
||||
WheelEvent => WheelData,
|
||||
@@ -117,6 +119,14 @@ impl From<&MouseEvent> for MouseData {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&MouseEvent> for DragData {
|
||||
fn from(value: &MouseEvent) -> Self {
|
||||
Self {
|
||||
mouse: MouseData::from(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&TouchEvent> for TouchData {
|
||||
fn from(e: &TouchEvent) -> Self {
|
||||
Self {
|
||||
|
||||
Reference in new issue
Block a user