leptos_use

Trait UseMouseEventExtractor

Source
pub trait UseMouseEventExtractor {
    // Provided methods
    fn extract_mouse_coords(&self, event: &MouseEvent) -> Option<(f64, f64)> { ... }
    fn extract_touch_coords(&self, touch: &Touch) -> Option<(f64, f64)> { ... }
}
Expand description

Trait to implement if you want to specify a custom extractor

Provided Methods§

Source

fn extract_mouse_coords(&self, event: &MouseEvent) -> Option<(f64, f64)>

Return the coordinates from mouse events (Some(x, y)) or None

Source

fn extract_touch_coords(&self, touch: &Touch) -> Option<(f64, f64)>

Return the coordinates from touches (Some(x, y)) or None

Implementations on Foreign Types§

Source§

impl UseMouseEventExtractor for Infallible

Implementors§