From 56ae0e63b9290652c40bfb0cd4657c05b947d909 Mon Sep 17 00:00:00 2001 From: Jean-Gabriel Gill-Couture Date: Wed, 28 Jun 2023 23:04:45 -0400 Subject: [PATCH] Happy face is white now --- src/components/background.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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, -
+
}