diff --git a/src/components/background.rs b/src/components/background.rs index 7ae5502..09abf22 100644 --- a/src/components/background.rs +++ b/src/components/background.rs @@ -1,8 +1,8 @@ - use std::f64; use leptos::html::Canvas; use leptos::*; use wasm_bindgen::JsCast; +use wasm_bindgen::JsValue; #[component] pub fn Background(cx: Scope) -> impl IntoView { @@ -19,6 +19,8 @@ pub fn Background(cx: Scope) -> impl IntoView { .expect("canvas to have context") .unchecked_into::(); log!("context = {:#?}", context); + context.set_stroke_style(&JsValue::from("white")); + context.set_fill_style(&JsValue::from("white")); context.begin_path(); // Draw the outer circle. @@ -45,7 +47,7 @@ pub fn Background(cx: Scope) -> impl IntoView { context.stroke(); }); view! { cx, -
+
}