Files
dioxus/packages/web/src/events/transition.rs
T
Chris RogusandMatt Hunzinger e5a1a62644 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>
2024-10-31 09:44:27 -05:00

23 lines
462 B
Rust

use dioxus_html::HasTransitionData;
use web_sys::TransitionEvent;
use super::Synthetic;
impl HasTransitionData for Synthetic<TransitionEvent> {
fn elapsed_time(&self) -> f32 {
self.event.elapsed_time()
}
fn property_name(&self) -> String {
self.event.property_name()
}
fn pseudo_element(&self) -> String {
self.event.pseudo_element()
}
fn as_any(&self) -> &dyn std::any::Any {
&self.event
}
}