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>;
}Available on crate feature
prelude only.Expand description
A interaction that contains data about the location of the event.
Required Methods§
Sourcefn client_coordinates(&self) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
Gets the coordinates of the event relative to the browser viewport.
Sourcefn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
Gets the coordinates of the event relative to the screen.
Sourcefn page_coordinates(&self) -> Point2D<f64, PageSpace>
fn page_coordinates(&self) -> Point2D<f64, PageSpace>
Gets the coordinates of the event relative to the page.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl InteractionLocation for DragData
impl InteractionLocation for MouseData
impl InteractionLocation for PointerData
impl InteractionLocation for SerializedDragData
impl InteractionLocation for SerializedMouseData
Available on crate feature
serialize only.impl InteractionLocation for SerializedPointInteraction
Available on crate feature
serialize only.impl InteractionLocation for SerializedPointerData
Available on crate feature
serialize only.impl InteractionLocation for SerializedWheelData
Available on crate feature
serialize only.