Skip to content

Commit

Permalink
feat: onglobalmousedown
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Aug 21, 2023
1 parent e2202fe commit 1c50d93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub fn measure_global_events(events: &EventsQueue) -> Vec<FreyaEvent> {
for event in events {
let event_name = match event.get_name() {
"click" => Some("globalclick"),
"mousedown" => Some("globalmousedown"),
"mouseover" => Some("globalmouseover"),
_ => None,
};
Expand Down
1 change: 1 addition & 0 deletions elements/src/elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ pub mod events {
onclick
onglobalclick
onmousedown
onglobalmousedown
onmouseover
onglobalmouseover
onmouseleave
Expand Down
2 changes: 1 addition & 1 deletion examples/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn app(cx: Scope) -> Element {
background: "rgb(168, 218, 220)",
color: "black",
padding: "12",
onclick: move |_| count += 1,
onglobalmousedown: move |_| count += 1,
label { "Click to increase!" }
}
)
Expand Down

0 comments on commit 1c50d93

Please sign in to comment.