mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
fix clippy on zoom example
This commit is contained in:
parent
69d7098d0e
commit
2e8af5fc62
1 changed files with 2 additions and 2 deletions
|
@ -13,14 +13,14 @@ fn app() -> Element {
|
||||||
|
|
||||||
rsx! {
|
rsx! {
|
||||||
h1 { "Zoom level: {level}" }
|
h1 { "Zoom level: {level}" }
|
||||||
p { "Change the zoom level of the webview by typing a number in the input below."}
|
p { "Change the zoom level of the webview by typing a number in the input below." }
|
||||||
input {
|
input {
|
||||||
r#type: "number",
|
r#type: "number",
|
||||||
value: "{level}",
|
value: "{level}",
|
||||||
oninput: move |e| {
|
oninput: move |e| {
|
||||||
if let Ok(new_zoom) = e.value().parse::<f64>() {
|
if let Ok(new_zoom) = e.value().parse::<f64>() {
|
||||||
level.set(new_zoom);
|
level.set(new_zoom);
|
||||||
dioxus::desktop::window().webview.zoom(new_zoom);
|
_ = dioxus::desktop::window().webview.zoom(new_zoom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue