add touch data to touch events

This commit is contained in:
Evan Almloff committed 2023-09-12 17:28:55 -05:00
1 parent b47064165e
commit c10700c962
8 files changed
+339 -160

No files matched your search

+13 -8
View File
@@ -62,10 +62,6 @@ impl InteractionLocation for DragData {
self.inner.client_coordinates()
}
fn element_coordinates(&self) -> ElementPoint {
self.inner.element_coordinates()
}
fn page_coordinates(&self) -> PagePoint {
self.inner.page_coordinates()
}
@@ -73,6 +69,12 @@ impl InteractionLocation for DragData {
fn screen_coordinates(&self) -> ScreenPoint {
self.inner.screen_coordinates()
}
}
impl InteractionElementOffset for DragData {
fn element_coordinates(&self) -> ElementPoint {
self.inner.element_coordinates()
}
fn coordinates(&self) -> Coordinates {
self.inner.coordinates()
@@ -128,10 +130,6 @@ impl InteractionLocation for SerializedDragData {
self.mouse.client_coordinates()
}
fn element_coordinates(&self) -> ElementPoint {
self.mouse.element_coordinates()
}
fn page_coordinates(&self) -> PagePoint {
self.mouse.page_coordinates()
}
@@ -139,6 +137,13 @@ impl InteractionLocation for SerializedDragData {
fn screen_coordinates(&self) -> ScreenPoint {
self.mouse.screen_coordinates()
}
}
#[cfg(feature = "serialize")]
impl InteractionElementOffset for SerializedDragData {
fn element_coordinates(&self) -> ElementPoint {
self.mouse.element_coordinates()
}
fn coordinates(&self) -> Coordinates {
self.mouse.coordinates()