Function freya_elements::elements::onpointerdown
source · pub fn onpointerdown<'a>(
_cx: &'a ScopeState,
_f: impl FnMut(Event<PointerData>) + 'a
) -> Attribute<'a>
Expand description
The pointerdown
event will fire when the user starts pressing an element.
Event Data: PointerData
Example:
fn app(cx: Scope) -> Element {
render!(
rect {
width: "100",
height: "100",
background: "red",
onpointerdown: |_| println!("Started pressing!")
}
)
}