Function freya::elements::onpointerover

pub fn onpointerover<'a>(
    _cx: &'a ScopeState,
    _f: impl FnMut(Event<PointerData>) + 'a
) -> Attribute<'a>
Expand description

The pointerover event fires when the user hovers/touches over an element. Unlike onpointerenter, this fires even if the user was already hovering over the element. For that reason, it’s less efficient.

Event Data: PointerData

Example

fn app(cx: Scope) -> Element {
    render!(
        rect {
            width: "100",
            height: "100",
            background: "red",
            onpointerover: |_| println!("Hovering or touching!")
        }
    )
}