Function freya_elements::elements::events::onpointermove
source · pub fn onpointermove<E: EventReturn<T>, T>(
_f: impl FnMut(Event<PointerData>) -> E + 'static,
) -> Attribute
Expand description
The pointermove
event fires when the user moves the cursor or touches over an element.
Unlike onpointerenter
, this fires even if the user was already hovering over
the element.
Event Data: PointerData
§Example
fn app() -> Element {
rsx!(
rect {
width: "100",
height: "100",
background: "red",
onpointermove: |_| println!("Moving or touching!")
}
)
}