mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-16 21:58:25 +00:00
chore: clean up zoom example
This commit is contained in:
parent
a13b69788b
commit
972084ee32
1 changed files with 4 additions and 3 deletions
|
@ -14,9 +14,10 @@ fn app(cx: Scope) -> Element {
|
|||
r#type: "number",
|
||||
value: "{level}",
|
||||
oninput: |e| {
|
||||
let new_zoom = e.value.parse::<f64>().unwrap_or(1.0);
|
||||
level.set(new_zoom);
|
||||
window.webview.zoom(new_zoom);
|
||||
if let Ok(new_zoom) = e.value.parse::<f64>() {
|
||||
level.set(new_zoom);
|
||||
window.webview.zoom(new_zoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue