dioxus_lib::events

Trait InteractionLocation

source
pub trait InteractionLocation {
    // Required methods
    fn client_coordinates(&self) -> Point2D<f64, ClientSpace>;
    fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>;
    fn page_coordinates(&self) -> Point2D<f64, PageSpace>;
}
Expand description

A interaction that contains data about the location of the event.

Required Methods§

source

fn client_coordinates(&self) -> Point2D<f64, ClientSpace>

Gets the coordinates of the event relative to the browser viewport.

source

fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>

Gets the coordinates of the event relative to the screen.

source

fn page_coordinates(&self) -> Point2D<f64, PageSpace>

Gets the coordinates of the event relative to the page.

Implementors§