Trait leptos_use::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

Implementors§